Animation freezes while blending

So I’ve created a player state machine via actor components. I have states like idle, running, etc. One of the states is punch and it works like that:

actor component “Punching”, when added to player, acts like this:


It binds to some events from player animation blueprint and call event dispatcher from player “Idle punch”
Then this call is registered in AnimBP and makes local variable “Punchable” to True

It triggers transition from Idle state to Punching state

In Punching state there is punching animation that has two notifies

The first notify is for turning Attack collision on, the second one is to trigger when animation ends. This notify turns state back to Idle state by setting “Punchable” to false and also it calls “punch end” event dispatcher

Which is bind in Punch component to trigger state change back to idle component

And from idle component you can call change state to add punch component and etc.

NOW
The problem I have is that when I press button to initiate Punch, first time it happens normally, but when i press it the second time right after the end of punch animation, then the punch is initiated, but animation just freezes at the beginning, therefore it doesn’t end and punch state doesn’t transition back to idle. What might be the problem behind freezing?

(Sorry for such lengthy setup, just wanted the situation to be as clear as possible)

I think I’ve realised what seems to be the problem. It may be because when I press punch button during transition from punch state to idle state it gets into punch state, but the punch animation is not reset.
Person from this topic seems to have similar issue, and proper solution wasn’t discovered yet…

Ok, so I found another topic about this issue and found out there’s actually an option in animation state called “Always Reset on Entry”. I ticked it - and everything works!
image

1 Like