|
Post by bender on May 30, 2019 23:18:01 GMT
I'm sorry for posting this here but I wasn't getting anything from the standard Unity community. I am not very good at handing animation so I was wondering if there was a way for me to let an animation end by being fully played ("Has Exit Time") or interrupted by a key press.
I have attached my very simple animation workflow which shows that after a "Strong/Unarmed Attack", the animation goes into an AttackIdle state. I would like to know how to interrupt this. I know I can reduce the Exit Time but I'd really rather not.
Currently, with what I have, the animation has to play out before the character can throw another punch/kick.
|
|
|
Post by Invector on May 31, 2019 12:18:10 GMT
You could simply add another transition with a condition to force exit earlier, for example:
If InputMagnitude > 0.1 it exits the state, so if you press any input it will exit that state. (You need to uncheck the option "Has Exit Time", this way you don't need to wait til the animations finish playing)
It's important to keep 2 transitions, one with no conditions and the Has Exit Time checked so it can naturally exit the state when the animations finish, and another with a condition of your choice to force exit.
|
|
|
Post by bender on May 31, 2019 15:18:00 GMT
Forgot about multiple transitions . Thanks for the InputMagnitude, I can never remember what that is for.
Thanks.
|
|