Multiple Joystick Input Trigger all Inputs
I have a 2-4 local multiplayer game set up. The game is simple and the multiple jostick controlls work fine with the x and y axis but i tried to Setup another button wich every could use ( a- Button ,xbox 360 Controler). Every Player has his own numer 1-4 and then gets the Input by : Input.GetButtonDown("Jump"+playerCounter) as i said the axis work perfectly fine but when i use this as playerOne with Joystick 1 all the Inputs "Jump1","Jump2",... are triggered though they are all assigned to their own Joystick.
Really need help with this ;(
Answer by BjornNelson · Apr 16, 2017 at 06:45 AM
In addition to configuring the "Joy Num" for each button, I believe you will also need to modify the "Positive Button" field. For instance, the Positive Button for button 0 on joystick 1 will be: "joystick 1 button 0", instead of "joystick button 0". These feels superfluous, as the Joy Num field is already constrained to the correct joystick. But, it seems to work. There are more details here: https://docs.unity3d.com/Manual/ConventionalGameInput.html
Thank you so much, I was looking around for an answer and you simply told me how.
Answer by firegate666 · Jan 21, 2019 at 02:07 AM
Hell no, you saved my life^^ I was already quite desperate. Thank you for pointing towards this documentation. I would not have noticed that tiny detail myself.
Still don't understand why I need to define it twice, but awesome that it works now,
Answer by wcg2du · May 12, 2019 at 10:24 AM
It still won't work for me as all controllers identify as joystick 1. Any help?,I still can't get this to work. The controllers all identify as the same joystick I think (as no mater the controller, only player one responds) and I've changed everything!
This sound like a general hardware setup issue. If you connect 2 joysticks and they both connect as joystick 1 this is an issue beyond Unity
Your answer
Follow this Question
Related Questions
How can i tell which joystick input came from? 1 Answer
Input System Button Triggers Multiple Times 2 Answers
Working with multiple joystick models 0 Answers
How to clear the keyboard buffer 1 Answer
UNITY no longer detecting XBOX360 controller input,XBOX 360 controller no longer working with UNITY 0 Answers