Animation stutters on listen server for remotely controlled pawns

EDIT: just realized the problem is not limited to blend spaces; it is affecting all animation, even a simple idle loop. I simply noticed the issue first with the blend space since that movement is more exaggerated than the idle loop. Investigating!

I’m having an issue with blend space playback in networked games. On the listen server, remotely controlled (client) pawns show a “stutter” when blending through a blend space. The blend space, however, works perfectly on client instances for all pawns (even for non-controlled pawns) and it also works perfectly for the server’s own locally controlled pawn. I’ve simplified the anim setup to try to isolate the issue, and right now I’m just applying a simple triangle wave (generated locally, not replicated) to simulate the values that would drive the blend space.

Here’s a video of the issue as recorded from the listen server, and put into slow motion to help illustrate what’s happening:

And in case it’s helpful, here are some screenshots of the simple animation setup I’m using to troubleshoot this.

Other things worth mentioning:

  • I’m using engine version 4.24.3
  • I’ve tried creating a new blendspace asset, using different target sequences, with no improvement
  • The issue affects both 1D and 2D blend spaces
  • No variables in the Anim BP are replicated (that triangle wave is being generated locally)

Anyone ever seen anything like this before, or have any ideas?

Thanks!

UPDATE: I just realized the problem is not limited to blend spaces; it is affecting all animation, even an idle loop animation by itself. I simply noticed the issue first with the blend space since that movement is more exaggerated than the other animated movements I’ve been using.

Investigation continues!

UPDATE 2: this issue is present even in new projects using the third-person template. Starting to suspect an underlying issue here.

Try adding this console command

p.NetEnableMoveCombining 0

Hey @Cytokinetik, that console command actually seems to help a bit, but I don’t think it gets at the root of the issue (whatever the real issue is). Even if running that command reduces the issue visually, there remains a pretty obvious difference between what the listen server sees and what the client(s) see.

In any case, thanks for pointing that command out to me, because it reveals to me that, though I thought I had already disabled move combining for my character, apparently I wasn’t entirely successful. I’ll dig into the source code to find out what that console command does and use what I learn to help improve my own code. So yeah, thanks!

I realized I hadn’t yet added some details that I’ve learned since originally posting this thread.

First and foremost, this issue is only present when the server is a listen server; since only the server POV sees the issue, the issue is not present when the server is dedicated.

Next, though I’m always reluctant to jump to any conclusions regarding engine issues, I found a couple of issues on https://issues.unrealengine.com that might either be related to the issue I’m seeing, or in fact the same issue. Here are links to those:

Unreal Engine Issues and Bug Tracker (UE-62225) (probably not the same issue, since this one is marked ‘Fixed’ but its description fits almost perfectly to what I’m seeing)
Unreal Engine Issues and Bug Tracker (UE-74459)

I’ve been meaning to dive into the engine source to see what I can learn that might help hone us in on the real cause, but other priorities have put such aggressive troubleshooting on the backburner for me (especially since this is only a visual issue, and doesn’t affect gameplay). But I hope to reach a point where I can dedicate more time to investigating this soon.

Recently came across a problem manifesting with the symptoms you describe, mainly stuttering. This happened when you direct AI to follow a path with the AI Move to Node over Behavior Trees. The fix was to add a slight ‘Interpolation’ lag in the Blendspace, for Speed.
My guess is this could also fix your problem.

Thanks for the suggestion, @unit23. Unfortunately for this case, we aren’t using AI controllers or Behavior Trees (yet) — the issue is present for player controlled pawns, but only those that appear on the listen server and are controlled by remote (client) players.

Each of those Unreal Issues I linked to has reproduction steps that work for reproducing the issue I’m seeing as well. Simply put, you can easily reproduce the problem by creating a third-person template project and connecting a two-player PIE game.

Thanks again for writing in. Someday we will eventually begin writing our AI controller behavior, and I’ll try to remember your tip for when that time comes, so we can avoid another stuttering headache!

@Cytokinetik, I need to follow up to give you more credit than I did originally. Previously, I tested the suggested console command in the third-person template project I’ve been using to troubleshoot this, and, like I said before, it did seem to reduce the issue there, but not totally eliminate it.

But I just finally tried that console command in our actual project, during a two-player PIE game, and — *wow *— what a difference it made!

So I do still think something else (very minor) is going on, perhaps with the engine itself, but it turns out that console command had way​​​​​​​ more impact than I previously gave you credit for.

The other realization you helped me arrive at is, I thought I had already totally disabled move combining for our characters, since we’re using a custom character class, with a custom character movement component class, and a lot of custom code. But running that console command and seeing an instant improvement proved that I must have missed something before. And sure enough, I had. So, thanks to you, I was able to make an update to our CMC class, and actually properly disable move combining. And things are looking much smoother because of it!

There’s still that very small underlying animation stutter that I’m still curious to investigate more at some point, but the issue I had when I made the original post is now 99% cleared up! Thanks again!

Glad it was of some help, a custom character movement component is definitely the way to go, something I need to work on myself…

Hi, is this problem has solved?
I find a simliar problem: Listen Server, clients animations are jittery/laggy - #15 by Chatouille

I think the root of this issue it the ‘bOnlyAllowAutonomousTickPose’. The aotonomous character on a server(lisenten or dedicated server). Because the animation timing to be driven by client’s network updates, in TickCharacterPose on CharacterMovement.