Several video games use a system to jump a few frames after a fall so that the gameplay is more comfortable and fair, in this case, I am trying how to do it, I don't know what to call it so I didn't find an answer, does anyone know? Anyway, this is the code that has to do with it.

extends CharacterBody2D

const JUMP_VELOCITYV = -400
var gravity = 1000

func _physics_process(delta):
if not is_on_floor():
velocity.y += gravity * delta

if Input.is_action_just_pressed("Jump") and is_on_floor():
    velocity.y = JUMP_VELOCITY
    Samdell changed the title to (CLOSED) Improve Jumping .

    Samdell Just a tip: You can and should mark the answer to your question. People than can see that this post has been answered. You don't need to change the title to closed (though this is a good habit when there is no feature to mark answers).

      Samdell Hey, no problem. That's why I mentioned it. It is unfortunately hidden behind the the three dots.
      ... -> Select best answer

        what is the correct formula for coyote time?