Quick answer: Set a 150 ms input buffer when is_action_just_pressed returns true. In _physics_process, if buffer is still valid and conditions allow (e.g., on floor), execute and clear buffer.

Here is how to fix Godot 4 platformer jumps dropped because the player pressed jump a frame before landing. Input buffering forgives mistimed presses.

The Symptom

Player presses jump 1–2 frames before landing. is_on_floor still false; jump check fails. By the next frame, is_action_just_pressed is gone. Player feels unresponsive.

What Causes This

One-frame just_pressed. The pulse exists for one frame; if conditions are not met, it is wasted.

Physics-Update sync. _physics_process runs at fixed step; can miss between-frame events.

The Fix

Step 1: Buffer the press in _input.

extends CharacterBody2D

var jump_buffer := 0.0
var coyote := 0.0

func _input(event):
    if event.is_action_pressed("jump"):
        jump_buffer = 0.15   # 150 ms buffer

Step 2: Consume in _physics_process.

func _physics_process(delta):
    jump_buffer = max(jump_buffer - delta, 0)
    coyote = max(coyote - delta, 0)

    if is_on_floor():
        coyote = 0.12
        velocity.y = 0
    else:
        velocity.y += 980 * delta

    if jump_buffer > 0 and coyote > 0:
        velocity.y = -400
        jump_buffer = 0
        coyote = 0

    move_and_slide()

Buffer + coyote covers both early and late presses.

Step 3: Tune buffer length to feel. 100 ms = strict, 150 ms = forgiving, 200 ms = very forgiving. Test with multiple players.

Step 4: Apply same pattern to other actions. Wall jump, attack cancel, dash — all benefit from buffering.

Step 5: Disable buffer during cutscenes. Buffer triggering after a paused interlude can cause unwanted action; clear on pause.

“Buffer in _input. Consume in _physics_process. Coyote pairs with buffer. Jumps land.”

Related Issues

For CharacterBody3D velocity, see Velocity Y. For mouse mode, see Mouse Mode.

150ms jump buffer. Coyote 120ms. Both cleared on use. Forgiving controls.