- Home /
Logitech steering wheel as Unity input?
The last few weeks I have been trying to hook up my logitech steering wheel to my unity car. In my car controlling script I just call the "Horizontal" axis via: Input.GetAxis("Horizontal"). That works fine, some of the buttons you can use via Fire1, Fire2 and Fire3 but the rest of the buttons I somehow can't find how to call them. Like for example, T want to use the two blinkers in my game, I don't know how I Have to access these.
Unity version: Unity Personal 2017.2.0f3, Steering wheel: Logitech Formula Force RX
Any help would be appreciated,
Ronin.
Answer by DanielleSisserman · Nov 20, 2018 at 10:54 AM
Here's the thing. Turns out, that to get the buttons input from the buttons on the wheel you cannot use Input.GetAxis(). GetAxis is like a slider value from 0 to 1 and buttons should only return true or false.
Looking up more online, you'll see that everyone recommends using Input.GetButton() and then just try all combinations in Input Manager to see which one works. This for some reason did not work for me. So I gave up on Input.GetButton() and am using Input.GetKey (or Input.GetKeyDown). this is what you gotta do:
1) run this script and press your buttons!!! it will show you the joy stick and button number specific for that button.
public class TestJoystickInput : MonoBehaviour {
// Use this for initialization
void Update () {
for (int joystick = 1; joystick < 5; joystick++ ) {
for (int button = 0; button < 20; button++ ) {
if (Input.GetKey("joystick " + joystick + " button " + button))
{
Debug.Log("joystick = " + joystick + " button = " + button);
}
}
}
}
}
now that you know the joystick number and the button number you can call:
if (Input.GetKey("joystick " + joystick + " button " + button))
from the update function in your script (depending on what you want, it might be better idea to call GetKeyDown()).
Your answer

Follow this Question
Related Questions
Logitech steering wheel snapping to middle? 0 Answers
How can i read the value from Logitech Driver Force Gt controller in my unity application? 0 Answers
Accelerometer car steering and screen tilt control function 2 Answers
2d Raycasting, trouble drawing rays at the correct angles 1 Answer
Looking for a model of steering wheel that is compatible with Unity 0 Answers