- Home /
Joysticks and the input manager. Joystick 1 recognized as all joysticks.
I'm trying to set up multiple controllers in the input manager but its not working as expected.
I have 4 entries, Jump1, Jump2, Jump3, Jump4
Each look for joystick button 0 (A) from their respective joystick numbers.
The problem is when I test it, using the code Input.GetButton("Jump1"), 2, 3, 4 joystick 1 fires all 4 jumps. Here's a screen shot of Jump1, and Jump2
Why is this happening? Thanks in advance
Answer by Loius · Oct 17, 2012 at 04:47 PM
"Joystick Button 0" is "Button 0 on any joystick" You want "Joystick 1 Button 0", which is "Button 0 on Joystick 1".
Edit - Oh, and "Joy Num" is specifically for the Axis controls. :S
one other issue in your current setup: you must change "Type" to "$$anonymous$$ey or $$anonymous$$ouse Button", or else it is using the axis input
Thanks, Loius. I even remember reading this in the manual, but forgot about it, and my game was going nuts.
Jhooks, you should mark this as the answer so other people will be more likely to read it.
Yes please post this as the answer. It took me way too long to stumble across this page!
Your answer
Follow this Question
Related Questions
Do multiple xbox controllers adjust their IDs on change 0 Answers
Input controls at run time reset to duplicate controls, why does this happen? 0 Answers
GameController Unity wrong Axis-Values 0 Answers
Inputmanager joystick axis alternative buttons 0 Answers
My input manager doesn't always respond to my code 2 Answers