Pawn movement not replicated to client
I have a simple test project.
I start the multiplayer game with two pawns (not characters) for two players to control. Each one has their own window in PIE (listen server)
The client reads an input button and sends a movement vector to the server through an RPC.
The server moves the pawn correctly. With the two windows in PIE I can see the pawn moving in the server version (listen server), but in the client the pawn doesn't move.
The Pawn BP has Replicates, Net Load on client, Replicate Movement, and Always Relevant Checked.
Any ideas what I'm missing?
MovementComp is a simple UMovementComponent. If I call AddActorLocalOffset directly, I get the same result.
If I add another RPC from the server to the clients, then I get the expected results, but why do I have to? I thought the "Replicates" checkbox handled that automatically in the background. If not, why is that checkbox there to begin with? The client that's in the same window as the server in PIE gets replicated correctly. The remote client on its own window is the only one not being replicated.
Movement component has it's own replication that takes care of network lag and client side prediction. You don't have to do RPC. Just call AddInputVector on client.
answered May 16 '16 at 11:47 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here