I've a 'classic' humanoid player with an animation controller and some animations.
This is the code i'm managing state changin
float h = CrossPlatformInputManager.GetAxis ("Horizontal");
if (h < 0) {
m_Animator.SetTrigger ("LeftWalking");
}
else if (h > 0) {
m_Animator.SetTrigger ("RightWalking");
}
else if (m_CharacterController.velocity.magnitude != 0) {
m_Animator.SetTrigger ("Walking");
}
else if (m_Jumping) {
m_Animator.SetTrigger ("Jump");
}
else {
m_Animator.SetTrigger ("Idle");
m_Animator.ResetTrigger ("Walking");
m_Animator.ResetTrigger ("LeftWalking");
m_Animator.ResetTrigger ("RightWalking");
m_Animator.ResetTrigger ("Jump");
}
}
My problem is that after i stop to press my "forward" button (that make my player walking), the walking animation continue to play itself till the end.
This is options of Walking to Idle state
I'm pretty sure I've to "play" with HasExitTime and/or FixedDuration but i'm not sure...