- Home /
How to get input data from a USB steering wheel
Hi,
could someone help me on this topic. I want to use a standart USB Gaming Wheel as an input source in UNITY. How can i access to the wheel Inforamtion ( Rotation left/right )
Thanks for help
Th.
Answer by Wisearn · Apr 26, 2012 at 05:45 PM
In the input manager you should be able to set binds for the steering wheel actions: http://unity3d.com/support/documentation/Components/class-InputManager.html
There is one horizontal that's set up for Joystick Axis (aswell as one for keyb/mouse).
You should be able to use them with: http://unity3d.com/support/documentation/ScriptReference/Input.GetAxis.html
Unity's input manager cannot fix this because it outputs 1 > -1 > 1 for steering wheels ins$$anonymous$$d of 1 > 0 > 1
converting a 1 > -1 > 1 output into a 1 > 0 > 1 input sounds like a very very very simple problem to solve with math/logic
sure it is but if both sides are 1 how do you know if the wheel is turned left or right?
no that makes no sense, are you sure getaxis/horizontal input axis usually isnt just 1 > 0 > -1 or 1 > 0.5 > 0??? 1 > 0 > 1 makes no sense what so ever, that value would be the $$anonymous$$AGNITUDE or math.abs