Hello and Happy New Year! Let’s hope 2021 is better than 2020.
I’m using a StateMachineBehaviour on some attack animations to trigger things like hitboxes and effects. However, in the event that I want to interrupt theses to play another animation, such as a damage animation, I want the current behavior to stop. I thought that’s what Animator.StopPlayback() was for, but I was wrong. I also thought by playing another animation, that should prevent the current animation from completing/reaching the normalized time I use to trigger effects, etc., but I was wrong. The animations are even on seperate layers, but still the interrupted animation keeps going. How can I make sure the animation I want to interrupt has actually been stopped?
Things I’ve tried:
Checking if the AnimatorStateInfo.fullPathHash has changed
Checking if the layerIndex has changed