Smooth pawn movement in networking?

I use the follow way: In Tick(…) function if pawn is locally controlled, I perform locomotion and call RPC to update replicated location variable on server. If pawn don’t have local controller, I update its location from this replicated variable.

The problem is SetActorLocation(…) called on server (listen it’s server) updates location of the pawn on all clients including locally controlled. Despite bReplicateMovement flag is set to false.

How do you handle it?

If possible I try to use the Character Movement Component, because it has tons of built in features for handling replication and movement. Is it possible for you to switch to a Character and use add input based on your locomotion, instead of setting actor location?

Then the replication is handled by default, and it’s very smooth (I’ve played my VR game with a friend in Australia, i’m in Canada, he has terrible internet, it runs fantastic)

I’d prefer to avoid using Character Movement. Character Movement requires AСharacter as an owning actor and Floating Movement works with Spectator Pawn. This actors have excess components that I don’t want to have in my VR Pawn - like skeletal mesh, for example.

It looks like my idea is basically correct. It works fine for scene components (like rotating doors). I just can’t understand why SetActorLocation(…) on server affects remote pawn even if ReplicationMovement flag is false. Probably some additional setup required here.

Hi, can help me understand how is possible create movement pawn multiplayer smooth? Tk :slight_smile: