jump animation problem

here is the picture
[70587-无标题.png|70587]

if (Input.GetButtonDown(“Jump”))
animator.SetTrigger(“CanJump”);

in the update function i use the code above to control the animation transition,in the animator controller window,i set a trigger named CanJump, so the problem is when i press the spacebar once at a time,the animation plays well,but as i press the spacebar more frequently,it gets the result shown in the picture,the character is just in the air,and it stucked there,it stops responding no matter how i press the spacebar,anyone ever seen this before?and thanks for your help

void Update()
{
float v = Input.GetAxis(“Vertical”);
if (GlobalControl._instance.IsRun)
{
animator.SetBool(“IsRun”, true);
animator.SetFloat(“V Input”, v);
}

    else
    {
        animator.SetFloat("V Input", v);
        animator.SetBool("IsRun", false);
    }

    float h = Input.GetAxis("Horizontal");
    transform.Rotate(0, h * TurnSpeed * Time.deltaTime, 0);

    if (Input.GetButtonDown("Jump"))
        animator.SetTrigger("CanJump");
   
 
    
    //  animator.SetFloat("H Input", h);
}

Try to increase exit time, probably the transition from jump state to idle state is too quickly and Unity get stuck.

i don’t know how settrigger works,accroding to the documentation.trigger is just like boolean parameter,it should set to false after the transition has completed,which i thought i will be false when entering the new state,so i use the same trigger to get it back to the previous state.then the newly entered state should only play once as it uses the same trigger which is already set to false,but i opened the animator window,it stays in the new state forever,while the trigger is false,it should exit the state.i don’t know what was going wrong,but i actually found a workaround,i used a coroutine.when player press jump button,i started a coroutine
IEnumerator JumpProcess()
{
animator.SetBool(“CanJump”, true);
yield return null;
animator.SetBool(“CanJump”, false);
StartJump = false;
}
this is the only way to solve that problem,and still it’s just a workaround,i don’t know what causes that problem