Answer the question
In order to leave comments, you need to log in
How to check if animation is active in if?
If so, it throws an error...
if (Input.GetButton ("Jump") && grounded) {
if (!animator.SetBool("IsJumping")) {
animator.SetBool("IsJumping", true);
}
}
if (grounded){
animator.SetBool("IsJumping", false);
}
Answer the question
In order to leave comments, you need to log in
and take not Bool, but a trigger.
animator.SetTrigger
resets itself after navigating it.
affixed -> the animator has moved on the trigger and will reset it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question