- Home /
 
How can ı activate my jump script only at animation
I have created a "run" bool at my animator then ı wrote script but jumping is not working. I want to jump only when my character at crouch animation. Thanks for help
private void Jumping() {
                 _jumpCooldown -= Time.deltaTime;
                 if (!(Run==true) || (!(_grounded >= 0) || !(_jumpCooldown <= 0) || !_jumpInput.IsDown) )return;
 
            
                 animator.SetBool("Run", true);
             
             var vel = playerRigidBody.velocity;
                 vel.y = jumpForce;
                 playerRigidBody.velocity = vel;
                 _jumpCooldown = jumpCooldown;
 
         
             }
 
              
               Comment
              
 
               
              Your answer