Question by
Laguna_Seca · Apr 10, 2017 at 07:41 PM ·
animatoranimationsstate-machine
Animator trigger does not unchecked after the play of the state
Sorry for my English.
As I understand the trigger should be disabled after the animation was played. In my case, the trigger does not turn off and the animation is played a second time, and only after that the trigger is turned off.
Animation from the fighting_idle goes to the Left when the trigger checked
Then he returns to the fighting_idle, and for some reason he goes back to the Left.
If you manually turn off the trigger through the code, this does not happen. But I would not like to do this, otherwise I do not see a difference from the bool. In what there can be a reason?
if (Input.GetKey(KeyCode.D))
fighterAnimator.SetTrigger("Forward");
if (Input.GetKey(KeyCode.A))
fighterAnimator.SetTrigger("Backward");
if (Input.GetKey(KeyCode.W))
fighterAnimator.SetTrigger("Left");
if (Input.GetKey(KeyCode.S))
fighterAnimator.SetTrigger("Right");
Comment