I want a player-controlled pawn to have the same Location
on both the server and client, so I have used SetReplicateMovement(true)
so that the server will replicate the location. However, when I set “Play as Listen Server” to test this, I can still clearly see that the state of my pawn becomes desynchronized and stays desynchronized between its owning client and the server. The Location
from GetReplicatedMovement()
is always (0, 0, 0) from the owner’s perspective.
Is there any way for the default replication systen to replicate to the owning client as well? Is that how it normally works and I’ve horribly broken something? Or will I have to just work out an answer the hard way by replicating the transform as my own variable?
Is the pawn using a movement component of some kind?
i.e. UPawnMovementComponent.
Alex Forsythe preparded a really excellent YouTube video on unreal networking, I strongly suggest watching it a few times…
It’s using my own movement component that inherits from UPawnMovementComponent.