Playing an anim montage is resetting the state machine

Hello, i’m not sure if this is a bug or not, but on one of my AI characters when i play an animmontage it resets the entire state machine and goes to the entry state again, and i want it to keep the state where he was in. Is there anything i can do to prevent that? I think i started having this behavior after 4.10 or 4.11, because i remember it didn’t do this before. Thanks.

I’ve tried it out in 4.10.4, 4.11.2 and it works fine. So i believe the problem started with 4.12. I can send the project i used to test this. It was created from a fresh third person template.

Hi xlar8or,

I bugged this last month in UE-31604 from this Answerhub post. Since then, it has been marked as “By Design”. The change in functionality was done on purpose as we’d like the state machine to be re-evaluated from Entry after a montage is played.

The main reason we don’t want the state machine running in the background during a montage is that the state would become “stale”, so to speak. Over the course of your montage, there are many instances where the expected state will change (i.e. rolling to dodge with a montage and going off a ledge would change the expected resulting state).

The state machine can be created with appropriate transitions to any of these expected states from Entry in the event it is re-initialized. However, the workaround that I posted in the other Answerhub thread can work as well.

Thank you for the reply and sorry for the duplicate. So if i want to maintain that behaviour i have to do that workaround, there are no plans for an option so we can pick whether we want to re-evaluate the state machine or not?

I tried the workaround and the root motion of the anim montage just broke. He starts sliding forward a lot, instead of going backwards.

You can use that workaround, or you can set up your state machine differently. Can you explain/show how you’re state machine is set up?

This is one of Unreal ‘gotchas’ that can take hours to figure out…

lol - so true. ZING!

I had this same problem. This is what worked for me: uncheck the Enable Auto Blendout box for each individual montage animation in asset details panel. This YT tutorial is what helped me discover what the problem was : Animating The Enemy Deaths | Shooter Minigame Part 6 - Unreal Engine Tutorial - YouTube

349729-animation-montage-fix.png

2 Likes

I’m facing the same issue, turning off autoblend is not a solution. What are the other workarounds?