I am trying to make a game for my xbox one. The game would be a 2-4 player fps battle game. The only problem is that I don’t know how to get input from more than 1 individual xbox controllers so I am wondering how to do that.
Currently, if you were to plug in multiple Xbox controllers into your computer, they would all be using the default inputs in Unity’s input manager. So, the Horizontal and Vertical inputs would be for all controllers for example.
If you were to look at those inputs in the input manager list, you would see that their joy num is set to something like “Get Input From All Joysticks”. You don’t want that (well, it depends). Making multiple inputs, and changing their joy nums to like “Joystick 1”, “Joystick 2”, and so on will grab the input from that controller. Kinda make sense hopefully? Essentially that joy num variable on the inputs are for multiple controllers.
Not only do you need to change “Get Input From All Joysticks” you also need to update the text put in for “Positive Button”.
Joystick Buttons (from any joystick): “joystick button 0”, “joystick button 1”, “joystick button 2”, … Joystick Buttons (from a specific joystick): “joystick 1 button 0”, “joystick 1 button 1”, “joystick 2 button 0”, …
I found this answer on Multiple Joystick Input Trigger all Inputs - Questions & Answers - Unity Discussions which referenced the detail I copied above from Unity - Manual: Input Manager