Multiplayer Movement Jitter

Hi,

I experience a lot of jitter for Characters controlled by other players in Multiplayer with the CharacterMovementComponent.
I thought it was an issue with my project, so I started from a clean UE5.4 ThirdPerson template, but the same issue happens.

I edited the template so that the Character automatically calls AddMovementInput every tick to move.
I extended the map in that direction so I can observe it for a while.
Also, I changed the mesh to a cube, because then you can see the jitter better compared to a skeleton with animations going on. Alternatively, you can just remove the animation from the skeleton.

I tested it with 2 players and both Play as Listen Server and Play as Client.
With Play as Listen Server, the client character jitters in the servers viewport.
On the other hand, in the clients window, the servers character does not jitter!
With Play as Client, the non-controlled character jitters for both players/views.

I made a video showcasing Play as Listen Server.
Left viewport is server, right viewport is client.
Left cube is server, right cube is client.
In the server viewport, the client cube jitters a lot.
In the client viewport, both cubes move stably. (The server cube jitters a tiny bit, but it is almost not perceivable.)
https://www.youtube.com/watch?v=KAU71d7zJ0M

I researched this jitter for days now and tried changing various blueprint properties (networking, replication, movement, collision), but nothing helps.

I tried the same thing in UE4.19 and it is basically the same. The jitter is so fast that the Character is completely blurry… Surely, I must do something wrong?

Search tags: glitch, stutter, choppy

I kinda solved it.
I noticed that the jitter changes when I mess with the FPS limiter.

You have to set the FPS limit for the Server to 60, or at least some value that your framerate can hit consistently. Otherwise you get jitter.
(The setting is at Project settings, Engine, General Settings, Fixed Frame Rate. There is also a “Server Fixed FPS” setting in the Editor settings, but it didn’t seem to work very well.)

Your Clients shoud also run at this frequency.
If they run lower, they will jitter on a Listen Server.
If they run higher, they sometimes move slower lol. (Workaround is to set the tick interval of the actor and its components to 1/ServerFPS.)

The Net Update Frequency of the Character didn’t really have a great impact in my tests.

Increasing the speed of the Character will make the jitter more noticable.

One more thing to note: When you have a configuration where jitter CAN happen, it happens MOST of the time, but sometimes it just doesn’t, until a restart. Makes tracing this a bit of a pain.

I guess this thread is related:
CharacterMovement Component Jittery/Not Framerate Independent? (single player) - Programming & Scripting / Blueprint - Epic Developer Community Forums (unrealengine.com)

I just wonder:

  • Why is this FPS setting unlimited by default if it breaks movement?
  • Why is movement/logic dependent on FPS in the first place?
  • Where is the documentation for this?