I have a APawn controlled by a player controller on the server and the client.
Now I dont have any movement components, I just use SetActorLocation and SetActorRotation to move the pawn around.
In a network game, the server’s pawn is correctly rotated and positioned on the client, but the client is not correctly rotated and positioned on the server
I notice the server will gather the position and location and send that to the client, so I would think the client should at least jump to where the server thinks the actor should be, but this does not appear to be happening.
I don’t know if this provides anything but I had a similar problem (Actually I still have it, just “fixed” it with a workaround):
My pawn’s (not characters that can use the cool CharacterMovementComponent ) position would slowly differ between server and client when moving, it stacked up more and more over time. To fix that I used a custom FRotator/FVector containing position/rotation and saved the server position/rotation in it, replicate it to the clients and use a RepNotify to override it. I still do not know why and how this happened, but maybe someone has a solution/idea what is happening!
yeah replicate movement is enabled, and I also tried setting bAlwaysRelevant = true
It looks like AActor::OnRep_ReplicatedMovement is being called correctly on those actors the server is responsible for controlling, just not for the actor the connected client is responsible for controlling :-/
hrmm I have a wild hunch, could it be that, the client sends the data to the server, the server then doesnt send any data back as it sees that the data has not changed somehow? this wouldnt really seem to be a valid theory as the actor on the client is not related to the actor on the server, both are out of sync in regard to position and location.