- Home /
Animator trigger stuck
Alright So I fixed one issue where I couldn't get the player's trigger to go off but now, he won't return to idle after swinging. It worked before and I'm not entirely sure why it doesn't now - the code is essentially the same but attached to a child object. ("OK" is just a variation of the swing)
Answer by xxmariofer · Jan 31, 2019 at 02:01 PM
hello, try resetting the triggers when you trigger the other
myAnimator.ResetTrigger("attack");
myAnimator.SetTrigger("OK");
and
myAnimator.ResetTrigger("OK");
myAnimator.SetTrigger("attack");
$$anonymous$$mmm, Didn't really do anything - thank you for trying though.
Check the animator while in play mode and tell us what is happening, if grtting trigger the animation but is leaving for some reason.
Answer by douglassophies · May 17, 2020 at 11:23 AM
I was looking into this and all the answers here: https://answers.unity.com/questions/801875/mecanim-trigger-getting-stuck-in-true-state.html when i realised it only happens if i play with the animator window when its running. That makes the animation freeze and if its frozen at certain points they get stuck. But not really an issue that needs to be resolved now i am aware of it.
Answer by gustavopuebla95 · Nov 13, 2020 at 03:59 PM
Maybe i am just a little bit Late but... Maybe you already tried make sure that to disable the loop checkbox from your animation asset that you want to go back to Idle state
Also Enabling the has exit time checkbox from OK state to Idle state(because if you dont do that it will keep asking for a exit parameter)