statebehaviour

Hi,

I’m using mecanim and when an animation has finished, in this case the character jumps and I want to return the state to the idle state. I am using the behaviour script and within this I have the following code

override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {

animator.SetBool(“Jump”, false)

}

so within mecanim i expected it to return to the idle state but it just stays on the jump on , any ideas. I am new to using this way of doing things but cant work it out.

Thanks for any help

Dave

Do you have a transition set up in mecanim from the jump state back to idle? And does it transition on the condition of Jump being false?