How to "Cancel" an animation immediately

Hello,

I am animating sprite sheets. However, I noticed in my Animation Controller that if my player stops walking, and the animation cycle/state for “walk” has just restarted, although my player has stopped moving, the animation will play until the cycle completes.

Is it possible, given an exit condition, such as (bool walking = false), as soon as this condition is met in the Animation Controller, we transition to the next state, even if the animation is halfway through playing?

Thanks!

It’s probably cause your transition has “has exit time” set to true.

Set it to false (Untick) and also change the transition duration to 0.

Imgur