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?
The RPC:
UFUNCTION( Server, WithValidation, Unreliable )
void Client_SendMovementToServer(FVector ReqMovement);
void ATestPawn::Client_SendMovementToServer_Implementation(FVector ReqMovement)
{
MovementComp->AddInputVector(ReqMovement);
}
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.