Multiplayer Gamepad Input

I am looking into my first project with local multiplayer, and I’ve run into a strange problem.
I have 2 xbox 360 controllers connected through a single receiver to my computer, and I’m trying to get their inputs into the game. I’ve had no issues with the joysticks, but Unity doesn’t seem to be able to differentiate between button presses from different controllers.
To clarify:
Moving the joystick on controller 1 moves P1 and not P2.
Moving the joystick on controller 2 moves P2 and not P1.
Pressing A on controller 1 causes P1 and P2 to jump.
Pressing A on controller 2 causes P1 and P2 to jump.

Attached is a snippet of my inputs showing how the buttons are set up. With this setup, “P1 Basic” and “P2 Basic” both activate when the A button is pressed on either controller.
I only have 1 input of each name in my inputs.

Does anyone have an idea of what I’m missing here?

This immediately screams like the issue.
However, I have never used controller inputs in Unity so would need confirmation.

I downloaded a game (Dungeonland, coincidentally made in Unity) from steam to test this idea.
The game was able to tell the inputs apart, so this tells me the issue is in my setup in Unity.

Setting Positive Button to “joystick button 0” means button 0 on ALL joysticks. You have to use “joystick 1 button 0” instead. The Joy Num field does not affect buttons, only the axis.

2 Likes

That did it!
Thank you very much for your reply, I don’t know how long that would have taken me to find on my own.

It is quite cryptic.

If you find you need better multiplayer input handling, check out my system, Rewired. Link to the website and a free fully-functional trial are in my signature.

1 Like

unity’s input is also being reworked at the moment:

might be worth voicing your issues in the feedback/collab/whatever :slight_smile: