Pawn movement replication

Hey everyone,
I decided to get myself into UE multiplayer recently, but I’m already stuck for the movement replication.
The player controls a pawn (not a character because the capsule component got me mad many many times), and the pawn is moved with Set World Location. It has NO floating pawn movement componen. I have already tried many things unsuccessfully.
Before I show any of my code, I would like to know how you guys would make it replicate.
Thanks :smile:

Pawn has no replicated movement.
Even with Floating Pawn Movement component, it has no replication.

My workaround, cause I use a pawn as player camera, is:
Send a movement input as value to the server and let the server set the new pawn location.

Here, my example:

1 Like

Ok ok I see how you do that. Tell me what you think about my BP.
I basically want to play as a trash can (sounds weird i know), trash can mesh is the root component. It basically works but it’s laggy, what could I do to improve it ?

I see.
You may want to use interpolation for the Movement.

Means, you send the new location to the Server event, starting a really short (around 0,2 sec) timeline, that lerps between the actor’s current position, and the target location.

Alternatively, really use a FloatingPawnMovement Component to AddMovementInput to the component, and just set the new Transform location for the server event (as i’ve done).

Well, I actually don’t want to interpolate anything, the movement looks good to me. However, I just said something wrong in my previous reply : the code on the screenshot DOES NOT work. The server can move, and its movement is replicated on the client, but the client can’t move at all.

(replicates and replicates movement are both checked)

Did you solve this problem ? I have same problem.

The server can not see player movement but client can see server movement. When I tried to same setup like you, client can not move.

Hey,
Actually, I had to make two events : one replicated on server, another on multicast. Checking Replicate Movement should allow us to not make the multicast one, but for some reason, it didn’t work.
Just do as if Replicate Movement wasn’t checked.

1 Like

DevBlog #10 Pawns instead of Characters on UE5 150 characters Check this out! LSF 2 first steps. - YouTube thanks I could make this : D