FK
Flemming Kejs
Jul 17, 2020
I can't get the two-player game to work. The problem is getting the input from the players. I have tried in Unity to go to Edit -> Project Settings -> Input -> Axes. Here I have changed the name of the first Horizontal and Vertical to P1_Horizontal and P1_Vertical - and inside the definitions I defined Negative Button to a and s respectively and the Positive Button to d and w respectively - the Alt buttons were blanked.
Similarly I changed the name of the later Horizontal and Vertical to P2_Horizontal and P2_Vertical, and here I used left, right, down, up instead of a, d, s, w.
The PlayerController script was then set to use GetAxis("P1_Horizontal") (and Vertical - and same for P2), but when I run the game, only player1 works - player2 does not get any input.
I have downloaded the solution, and they use GetAxis("Vertical" + inputID) - meaning they have used Vertical1 and Vertical2, where I used P1_Vertical and P2_Vertical.
So my idea seems right - it just doesn't work. Does anybody have a clue about what I am doing wrong?