- Home /
How to assign PS4/XB360 Controller Triggers?
I can use the right joystick for the steering of my car with "Input.GetAxis("Horizontal")" with analog, but when I use "Input.GetAxis("Vertical")" it uses up and down of the right joystick instead of the triggers.
How can I use the triggers of the PS4 controller or any PC controller?
EDIT: I found the Input Manager and changed the axis on Vertical from axis y to axis 3 and it still does not work!
Answer by Seth-Bergman · Jan 12, 2014 at 08:01 AM
You have already answered your own question.. However, note that there are TWO "Vertical" inputs in the input manager.. change the second one, and note the dropdown on the first says "key or mouse button", while the second says "joystick axis"
I solved this before you answered. But I have another problem. $$anonymous$$y car drives backwards when no triggers are pressed. When I press R2 it goes forward as normal. Also it dives backwards when I press L2. The problem seems to be that it doesn't want to return to 0 when nothing is pressed.
I also found out that R2 is the 5th axis.
this shows all the mappings: http://wiki.unity3d.com/index.php?title=Xbox360Controller as for your other issue, maybe you need to adjust the "dead" setting http://docs.unity3d.com/Documentation/Components/class-Input$$anonymous$$anager.html to something higher
Answer by tanoshimi · Jan 12, 2014 at 08:22 AM
Your question title says XBox360 controllers - your question body says PS4. They have different mappings, so you'll need to change input manager depending on which you really mean: