0
votes

I am using Unity 2D and am quiet new to this. I am trying to make a multiplayer platformer, and have started so. When I test my networking, however, all players match up to one input. Is there any way to edit the standard movement script to handle multiple user inputs, per build? Thanks!

1

1 Answers

0
votes

If you do the following it should solve the problem:

void Update () {
      if (!isLocalPlayer) 
          return;

      if (Input.GetKeyDown(KeyCode.W)) {
          ...code here

This means that the code after this if-statement will only be processed on the local player.