The triggers from the Xbox 360 gamepad are accessed by axis in Unity. I was wondering if there is a way to recognize them instead as keys.
Thanks in advance
0tacun
The triggers from the Xbox 360 gamepad are accessed by axis in Unity. I was wondering if there is a way to recognize them instead as keys.
Thanks in advance
0tacun
Try using axis 9 and axis 10 to read the triggers. This has worked for me in the past, but I think I heard that it doesn’t work properly when you have multiple Xbox360 pads connected to the same PC. This is usually blamed on poor quality DirectInput drivers provided by Microsoft.
Microsoft also provide XInput drivers for the pad, which apparently work a lot better, but Unity’s input system doesn’t use XInput so it can’t benefit from those drivers.
Apparently you can still use XInput yourself to read the pad, for example using this library:
But I haven’t tried it.