Incredibly confusing AnimBP behavior over network

I’m having an incredibly confusing issue with my networked player’s run cycle. The server sees one of the clients sliding around, their run cycle playing at roughly half speed. The player’s see their own animation’s playing correctly, and the player’s capsule movement is smooth and correct, no issues there.

Things of note:

  • There is no game logic that governs the playback rate of this animation. It is always set to a constant 1.0 speed.
  • The run cycle is fully blended in - it is successfully navigating the state machine on both client and server.
  • The skeletal mesh is not set to replicate, so in theory its animation should be evaluated entirely locally by each player, yet it seems something is interfering?
  • One specific player on one specific hardware configuration is showing this issue - in a 3 player game, I would see that same player always have this issue (and perhaps not coincidentally, always loads into the map last). Their PC is pretty powerful, and their framerate is in the high 90s, so it shouldn’t be a perf issue.

I am at a total loss on this. Any ideas on things to try? It makes no sense that an animation BP would evaluate differently over a network when nothing about it is set to replicate, so I feel like I must be missing some checkbox somewhere that is causing interference.

EDIT: Actually, I just confirmed that it seems to be everything in the animation graph that’s playing at a slower rate from the server’s POV, including idle animations, so at least that rules out physics/movement component stuff.

Okay so just to confirm this the Server see all Clients Animating at a slower rate or only one particular client? Is it always the same Player or just the third Client that joins?

It’s always the same specific player on that specific PC. Doesn’t matter if they’re third or second or if its only them and the server. I think it has to do with framerate on their end (over 90fps), because the same player on their laptop doesn’t exhibit the issue.

Did some more digging and I’m speculating that it may be related to this? In this post (linked below) I saw someone claim that in the source code, CharacterMovementComponent can be found manually ticking the pose of the character mesh which, if true, sounds like something I really don’t need.

It makes sense though, because I’ve definitely seen other cases where, during bits of latency or framerate dips, a client may have their animation appear briefly choppy. I want my animation’s to be evaluated completely locally, only syncing a variable now and then to drive it.

Further testing shows that the degree of slowdown seen by the server is in fact linked to the framerate of the client in question. Higher FPS on the client = slower anim playback speed on the server. I set up a very powerful PC and set their quality settings to minimum, so that I would get super high FPS (240fps).

This caused the characters animations to play even more slowly. Their walk cycle looked like it was at <20% normal speed.

I tried having the server also set to low, to try and get their FPS to match. It seemed like that might have improved it a bit, but it was hard to tell. Still in slow motion, but it seems like the different between client and server FPS is a factor.

Curiously, animation montages are not affected by this. I have a few one shot anims that are played additively over my state machine(s) in the character’s AnimGraph, and they played at the correct speed even while the idle/run loops were molasses.

I’m going to consider this “solved” for me, but also think its an oversight/bug in Unreal’s character class.

As a test, I disabled/hid the character’s default skeletal mesh and made my own - a duplicate with the same AnimBP and mesh, and pointed all of my logic to the new one instead of the now hidden, disabled Skeletal Mesh that comes with a Character.

Sure enough, it looks perfect!

So this confirms what I found in that other post - that the CMC meddles with the character skelmesh pose, and evidently starts to break when the server/client have wildly differing framerates.

The skel mesh itself is not set to replicate, so I feel like this is bad behavior. The only replication related flag I have enabled is “Replicate Movement” ticked on in the class defaults, which I’d expect would only replicate the the movement of the player’s capsule, but alas, it has tendrils elsewhere.

1 Like

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