I have the following code in my Update
method, and when I use my controller, It affects all characters for some reason and I am not sure what is wrong. When I press the A button on the controller only the first player 1
should be affected.
PlayerID:
[Range(1,4)]
public int playerID = 1;
If statement in update:
if(Input.GetButton("Select Character " + playerID) && !selected){
selected = true;
rigidbody.AddForce(Vector3.up * 40f, ForceMode.Impulse);
currentChar.GetComponent<Animator>().SetBool("Cast Spell", true);
}
Here are my input settings for players 1 and 2
And here are my input settings for players 3 and 4
Can anyone see what is causing this to happen?