Search Unity

Steering wheel getAxis problem

Discussion in 'Scripting' started by cjheadleand_unity, Oct 18, 2017.

  1. cjheadleand_unity

    cjheadleand_unity

    Joined:
    Oct 18, 2017
    Posts:
    1
    Hi All,

    I have an issue with a steering wheel controller I am using with unity.
    I have tried this with a few games (works fine) and the wheel outputs the right info in the manufacturers configuration app. But, in unity I get a strange behaviour on the horizontal (steering) axis.

    If I turn the controller right the controller outputs from -1 to 1 (with 0 being half way through the right rotation)
    If I turn the controller left, the controller only outputs -1.

    I have tried checking all the reported axis to see if any of these provide the right data (they don't).

    I have looked around and found a few people talking about the same issue, but no answer as to how it was resolved. e.g. http://answers.unity3d.com/questions/243447/steering-wheel-joystick-getaxis-trouble.html

    We are working in the latest version of unity, on a windows 10 machine.
    The controller is a thrustmaster rgt pro.

    I assume the issue is in Unity? As mentioned, the controller works in a number of games, and the controller's own configuration utility shows all the expected values... (so I assume this rules out the driver).

    Can anyone point me in the right direction?
     
  2. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    This sounds like the HID information on the axis is in a format that Unity's system does not recognize. This happens frequently with HID axes that return signed values. There's nothing you can do to modify this. It's likely the other games you mention work because they're using Direct Input which can handle these axes. Unity does not use Direct Input. I suggest you try Rewired which can work with many devices Unity can't. It also has the option of using Direct Input if you choose to.