Incomprehensible animation montage issue

As seen in the attached video, I have created an anim montage that plays well in the editor. In blueprints, I have set it up to play when the character gets hit. However, as the video shows, in game the animation snaps between frames (or is in other ways bugged). I cannot figure out what the problem might be. What might even cause this weird behavior?

I have experimented with different blend in/out options, but none seem to work. I have other animations that use the same options and they work just fine. The montage slot is also correctly set since other anim montages that use this slot display correclty.

Does anyone know anything that might help me debug this? I would be very grateful for any hints.

Is the hit reaction animation root motion?

Yes, all animations are root motion.

is it single player or multiplayer? Root motion seems broken in replication in 5.1

This is single player only. Version 5.1.

Hey @TheMarvok!

What about the possibility that it isn’t animation related?
Does your AI have things like turning to face the player on tick and things like that? Because it seems like it is rotating to face the player mid-air.

The enemy AI is disabled in this video. He won’t react to the player in any way. The hit character is just set to play the anim montage when overlapping the yellow hitbox.

@TheMarvok Is it possible it’s attempting to play one additional time each tick it’s colliding with the sphere? Try adding a “Do Once” before the Montage and then on montage completion, reset the “Do Once” node?

Looks similar to Replication Graph animation tick optimization.
Could there be any runtime optimizations changing the animations tick rate / update during the playback?

I have checked this. But sadly no. It is set up correctly to play one time only upon begin overlap (plus I made code that double checks to not apply the effect twice).

I am also not aware of any runtime optimizations that could change the animation tick rate since I haven’t added anything myself on top of the default options.

You could try turning on URO and seeing if it changes anything (option on skeletal mesh).

You animations are converted to animation montages?

I have noticed something that might be a clue.
The animation sequence I’m using is 60fps but when I drag it into the montage it becomes 30fps. This seems like it might be causing frame skips in editor (and there is one that is particularly jarring), however I don’t see how this could cause such a discrepancy between what I see in the editor and in game.

Sadly, the update rate optimizations didn’t change anything. But I managed to somewhat improve the result by explicitly stopping all other animations before playing this one.

What bugs me the most is that despite doing this, the animation is still skipping multiple frames during the moment that the character turns around in the air.

Could it be a corrupt animation? Does playing a different root motion in it"s place have the same slowdown?

All other root motion animations work fine (such as the animation of getting up from the ground). But it still doesn’t explain why it look good in the editor, but not in game.

I suspect this particular animation’s problem is that it contains very rapid rotation of the character and unreal just doesn’t want to play all the frames in game.

I just encountered this issue (or a similar one).

It’s likely a montage-related bug.

I found that:

  • setting the montage’s blend in to 0 fixes this (but disables the blend).
  • changing the montage or the base animation fixes this.
1 Like