Pawn replication issue
I have some problems with a Pawn and a FloattingPawnMovementComponent. I can not retrieve the location of the pawn on the side of the server.
My pawn is configured as follows: Replicate Movement, Net Load on client, Replicate checked.
However, it is not visible to other pawn, and when in a custom event running on the server I use GetPlayerController>GetControlledPawn>GetActorLocation it's always Zero. I have add IsValid between GetControlledPawn and GetActorLocation for testing purpose, that does not give me any error.
The conclusion is that my Pawn is obviously not replicated, but it seems to be present side server.
However, why is not he replicated since he is configured for this? I can not understand the inner workings of the pawn and the MovementComponent, nor why the server seems to completely ignore the parameters ...
asked Mar 10 '19 at 09:51 PM in Blueprint Scripting
Assuming that the base class of your pawn is APawn then what you have is the expected behaviour because movement replication is not a default feature of this class. So you would have to do the replication by yourself by :
(for more info you can read this thread)
While this would work, you should rather use the ACharacter class with its CharacterMovement Component that takes care of the movement replication automatically.
Hope it helps.
Follow this question
Once you sign in you will be able to subscribe for any updates here