Moving a remote character.

I made a new LocomotionHandler class to attempt to move remote players but it moves both players.

Is it still pulling from the PlayerInput script and I need to make a NetworkPlayerInput instead of handling it this way or what would be the best approach?

Code

Was too big for forum I guess.
 
Networking is a huge subject so unfortunately I won't be able to help too much in this case. If you are controlling the character remotely you do not want the character to use the local player input source though.
 
I guess it would be similar to AI input. All it's doing is syncing the input from players, or trying to.

In that script if the input belongs to the player it will send out an update if there is a large enough variation from the last input or enough time has passed and then every second syncs the rigidbody.
 
So looking at your AI movement, I should be calling something like this instead:

DeterministicObjectManager.SetCharacterMovementInput(m_CharacterLocomotion.DeterministicObjectIndex, 0, 1);

But the object manager index's would have to be synced across all players.
 
Top