Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Joystick calibration

Discussion in 'Scripting' started by sonalikare, Aug 20, 2010.

  1. sonalikare

    sonalikare

    Joined:
    Jul 20, 2010
    Posts:
    18
    Hi ,
    Can Unity or a Unity game read Windows' stored calibration of a game controller?

    Please help as soon as possible as it is very urgent.
    Thanks in advance!
     
  2. AkilaeTribe

    AkilaeTribe

    Joined:
    Jul 4, 2010
    Posts:
    1,149
    http://answers.unity3d.com/question...oystick-buttons-for-an-xbox-360-pc-controller

    If you want to detect button 0 for any joystick, you must put in Positive Value : joystick button 0

    To detect button 0 of joystick 1 : joystick 1 button 0
    (the joy num value is not taken into account)

    To detect axis, you must specify the joy num (in this case it is taken into account), but any value in Positive value is required.
     
  3. sonalikare

    sonalikare

    Joined:
    Jul 20, 2010
    Posts:
    18
    Joysticks are working fine with the project, but the problem is that I want to use a proprietary joystick
    where the axis switches don't travel the full range of it's potensiometers, so it needs calibration.

    Windows calibrates this just fine, but the Unity project (or Unity Editor) won't detect Windows'
    stored calibration for full axis range and center position.
    Thanks!
     
  4. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I've not had this problem with stand alone players, but have run into something similar in the Unity editor. Is that what's happening to you too? I wasn't able to find out where the input "preferences" were saved for the editor, whereas they are easy to find for a stand alone. Are you using a 3rd party driver or the Windows control panel? Are you using 2.6.1 or 3.0b?
     
  5. AkilaeTribe

    AkilaeTribe

    Joined:
    Jul 4, 2010
    Posts:
    1,149
    Did you modify the Sensitivity value in the Input manager ? It should be to 1 by default (I think).
     
  6. arildness

    arildness

    Joined:
    Aug 21, 2010
    Posts:
    2
    Can anyone please have a look at this problem? it's very urgent that this is solved very very quickly. I've also written to some of the Unity guys, but we haven't got any replies yet over the weekend.
    This game controller has the BU0836A card from Leo Bodnar inside it, and is no different to majority of joystick devices on the market.
    The levers on it uses only part of the pots range, but windows calibrates it just fine both with full range and center position.
    Someone who knows how to pick up windows calibration to Unity
    Any help is appreciated, it's critical
     
  7. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    OK, I've run this past Unity's Windows guru, Ignas, and here is what he has to say about the matter:-

     

    Attached Files:

  8. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    That's a little undocumented "gem". It would be very helpful if what Unity writes to the Windows Registry (and what options exist for those entries) were documented someplace.
     
  9. sonalikare

    sonalikare

    Joined:
    Jul 20, 2010
    Posts:
    18
    Ok I will try.
    Thank you very much for help.
     
  10. ikriz

    ikriz

    Joined:
    Dec 3, 2009
    Posts:
    98
    Has this bug been fixed in 3.5.5f3 ? I'm still having troubles even with the Registry values...?
    @sonalikare: Did this work for you?