Choppy Client Movement in Packaged Game

Anyone have any advice or ideas on lagging/chopping character movement for a client? Everything works fine in editor. But when I package the clients movement lags… it’s very weird though, because animations work fine. And moving forward and backwards are actually pretty good… but moving side to side gets choppy…

Here is my movement inputs:

Here is the Character’s settings:
image

Here are my character movement component settings:
image

My mesh component is not set to replicates.

Thank you for any help!!

anyone have any experience fixing this? It’s a gamebreaker if you’re trying to create a multiplayer game…

does movement need to only go through server maybe?

Go read the entire CMC page.

CMC uses client side prediction. If your moves result in a different position greater than n MOR, the server will correct.

There are two types of correction.

Soft, small/short distance changes result in an interpolated (smoothed out) correction over many frames.

Hard, large distance changes result in a full teleport and state update.

Jitter/choppy movement is the server resetting your clients invalid position and state to match its correct position and state.

Thank you @Rev0verDrive for the reference. My issue is the jitter/choppy movement, the server resetting the client to match the correct position. How do I make that less choppy?

I’m guessing I could play around with some of these settings? Im guessing what’s happening is the client moves and every 0.1 seconds server is correcting slight variances in position for the client, so it’s jittering it around… so increasing some of the min times might make it less chopping… but trade off would be instead of frequent incremental position changes, you could have less chopping changes but larger distances… almost creating a “teloport” type of look… which also isnt good

It’s not a CMC setting. It’s how you are replicating movement.

Should also note the server needs to come to the same exact result for the Move On bool.

Do not replicate that, let the server calc the result itself. If it depends on other conditions and values, the server needs them.

Show your code for setting “Move On”.

1 Like

TheEnhancedInputAction event you have, where did you get that from? Is that a plug in?

The move on/off set with some AnimNotifiers. So in the Anim BP, I have this logic:

Which then set it in the Character BP:

It’s just for things like attacking, where I want the animation to play without movement etc.

As far as how I’m replicating the movement, I guess I’m just using the default UE Character Movement. So I haven’t made any adjustments to it.
Thanks again for all the help!

I see the issue in image 2.

Replication doesn’t work Client → Server. You have to Set vars on the Server, then replication passes those values to clients.

From what you’ve shown the choppiness is caused by the Move On and Is Ready variables.

That’s the new input system. The old (you’re currently using) is for the most part deprecated and will eventually be removed completely from the engine.

The following image is from a 5.1 project.

Thank you @Rev0verDrive, makes sense on the move on/off. And Client was being set one way and server another, so potentially creating some issues. I’ve fixed and will repackage and give it a try!
Unfortuently, EnhancedInputAction doesn’t look to be avaiable on UE4, only UE5

Hey @Rev0verDrive - tried it again and works so much better, thank you for the help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.