Jittery Character Movement on Client

Hi all,

My team and I are working on a sport simulation project that runs in editor. Multiple characters are driven by data we receive and move around a field. Typically the operator will host on one machine, and another will connect as a client for viewing.

Recently we’ve run into an issue where our characters seem to jitter on the client. This seems to be affecting both their transforms and as a result, their animations. It looks like multiple frames are being skipped between updates.

As a bit more context, the characters have a standard Character Movement Component with settings identical to Lyras’. They are parented to another actor which is what is being directly moved by the data we receive. In the past this has worked fine for us but at some point we began to see this jitter.

What are the main things to try when attempting to identify the cause of this issue? I’ve spent a few days troubleshooting this issue without any luck. I’ve tried edits to DefaultEngine.ini I found suggested in other posts, changing settings on the CMC, stripping out the animations entirely… I have tried using the network profiler and nothing seems amiss at first glance, but then I’m not 100% sure what to look for there. This is a BP only project but if there was a C++ solution we could look at implementing it.

Thanks in advance

Jitter is caused by the server correcting the client. It’s calculations are not matching the clients.

You can try one or both of these options. But you will lose server authority on the movement.

One of the most common root cause of the jittering is the change of the max walk speed.

The CMC (Character Movement Component) is locally predicting the movement, while sending the necessary information to the server so the server can replicate the movement done by the client. If the server movement results in a different position than the client predicted, a correction is sent back to the client (just as @Rev0verDrive mentioned), causing jittering.

In the editor, you can enter two console commands that can help find these issues early.

Enter this to enable packet lag, simulating a real-world network. I like to set this to an extreme value (say 500ms) because any error is more obvious this way:
NetEmulation.PktLag 500

The other option is optional, helps you identify if a correction was made:
p.NetShowCorrections 1

Ii you indeed change the max walk speed (e.g. character sprint), then you have to do some extra work so the CMC prediction will be correct. A video explanation: https://www.youtube.com/watch?v=RtQRMcupJs0

I am having character correction on a client with an emulated 50 latency.
its a new project in 5.8
it seems to be this issue here https://issues.unrealengine.com/issue/UE-198521

If I make an AI walk slowly, and I as the client run into the AI from any direction it does corrections pretty much every frame and jitters/rubber bands the character.
I don’t understand why. Its a clean test project nothing has been changed and it corrects even if the max walk speed is only 200, so its not a high movement speed either.

I noticed this on a medieval melee project I was working on, the client would jitter around the AI enemy. I thought it was something I messed up with the CMC but a clean third person project does the same thing.

Do I need a different VS or something, I am using 2022. I can’t remember why exactly, There was a good reason I just can’t remember why I went with the older version.

This issue is so basic yet game breaking. Any help would be great thanks.