Input.GetButtonDown("...") && Input.GetButtonUp("...") always returning false

So i was trying to make an Air Dash ability to my character but in order to it to work i need to verify if the player stopped pushing the jump button (i want to do that by checking Input.GetButtonUp("Jump) value) but no matter what its always returning false. Same thing goes to the Input.GetButtonDown(“Jump”) value. Atp idk what im doing wrong.

Here’s a little example of what im doing:

private void Jump()
{
    if (Input.GetButtonDown("Jump") && isGrounded)   // Player starts pressing the button
        isJumping = true;
    if (Input.GetButtonUp("Jump") && !isGrounded)     // Player stops pressing the button
        jumpCancel = true;


    // Normal jump (full speed)
    if (isJumping)
    {
        verticalVelocity = jumpAcceleration * Time.deltaTime;
        if (verticalVelocity >= maxJumpDuration)
        {
            isJumping = false;
        }
    }

    // Cancel the jump when the button is no longer pressed
    if (jumpCancel)
    {
        if (verticalVelocity < minJumpHeight)
        {
            verticalVelocity = jumpAcceleration * Time.deltaTime;
        }

        if(Input.GetButtonDown("Jump") && !isGrounded) //presses the jump button again while in the air
        {
            //AirDash();
        }

        if (isGrounded) jumpCancel = false;
    }

    // Aplica a velocidade vertical ao personagem
    Vector3 verticalMovement = Vector3.up * verticalVelocity;
    characterController.Move(verticalMovement * Time.deltaTime);
}

Where are you calling Jump from?

  • Check you’re calling Jump() at all.
  • Add Debug.Log() calls to see which parts of the Jump() method are actually being executed.
  • Alternatively, add a proper debugger breakpoint so you can examine variables when you get there.
  • Check you’ve configured your project to support the old Input system, or both the old and new.

(By the way, this forum area for Input System is for the newer API, not the Input class you’re using.)

1 Like

i call it in the update:

   void Update()
   {

       CheckGround();
       Move();
       Jump();
       ApplyGravity();

   }

ig ill try to change the input system to the newer one