Multiplayer client movement issues

Hello everyone,

I’ve been stuck on this for a very long time now. I’ve looked through the networking documents and tutorials but I can’t really find the solution for my problem.

When a client connects to my server, the movement of the character on the server is behaving as it should, but the movement of the client is not. It’s replicating, but the movement at the client’s screen isn’t what it should be. For example, when I press shift on the host, the max walk speed goes up to 2000. When I do this on the client side the max walk speed stays as is. This behavior also occurs when testing inside the editor with 2 players, the first screen to start has good behavior, the second is really bad.

I really can’t find the problem so any help would be appreciated.
Here’s a screenshot of my blueprint:

I actually had the same issue, but ignored it for now. Maybe the movement speed has to be change on server instead of setting it locally. I would try and execute a RPC and toggle the running on server side

You probably want 1 of 3 things instead of the way you’re doing it.

The Max X Speeds aren’t really things that need to be modified at runtime. Your max should be the absolute max for whichever movement mode you’re in. Then you can modify whatever you’re passing into your AddMovementInput to adjust how fast you’re actually running on the client.

Otherwise you could use the MaxCustomMovementSpeed to hold your sprint speed and change to that movement mode when you want to sprint.

Last option, is to create an RPC that changes the max walk speed on the server as well as the client, but I’m not 100% certain how well that would work on other clients because the max speeds aren’t replicated on their own and I get the feeling that trying to change them at runtime will get messy across multiple clients.

I can confirm your last assumtion (messy, not replicated) to be true :slight_smile:
Even worse, with really high movementspeeds you notice the lag. When raising and reducing the value, actors get off sync

Thanks for your reaction. I’m not sure how to do it yet and keep trying to find the best solution. It would be great to have an example, I just can’t find it yet.

Any news on this issue?

Did you manage to fix the issue?