The state machine delays its transition

This is how I’ve got an attack animation set up right now:

In my character’s blueprint, I set a bool to true when I press the attack button. My animation blueprint checks this bool on every tick, and when it sees it’s true, the state machine transitions from my idle state to my attack state. I then have an Anim Notify on the very last frame of my attack animation that, when triggered, sets the bool back to false, which causes my state machine to transition back to the idle state.

This works, for the most part. There’s an odd delay, though, where the attack animation finishes, but then starts to loop again for about an eighth of a second or so before it finally transitions back to my idle state. What’s with the delay there? It’s causing trouble, and I haven’t been able to figure out what’s causing it. It only occurs when transitioning back to my idle animation, and never when transitioning to my attack animation; that’s always snappy.

Though I’m sure this generally isn’t the best way to program this sort of thing. What’s the best way you guys have found to transition to and from attack and idle animations?

same problem for me
and the delay causes jitter of the character
my solution is adjusting the finish notify forward about 20%
then it’ll enter blend state earlier and finally full stop at end
but i don’t know whether it’s a right way
is there anyone else?

Right, the problem seems to stem from the animation blending out back to my idle animation, but I don’t know how to adjust the Blend Out Time in a state machine, or even if that can be done.

I’ve switched over to using animation montages in my project, though, and those are working great, so I’ve at least found a way around the problem for now. :slight_smile:

hello,glad to know there’s another method for this.

i want to know the detail how you do with montages, please.

my solution is very simple, add a custom notify called “finish”(or anyother) to the position about 80% of the attack sequence, the capture this notify in the event graph, and do some animation convert logic, such as set a "IsAttack” variable to false, which should cause the anim state machine make transition alone from the attack node, so the blending start in advance and finally stop smoothly at the end.

but i don’t think my method is best, as the animation blend is such a base function, it shouldn’t be fninished by user-code( instead of built-in config)。