Quick answer: Increase floor_snap_length to 4–8 pixels, raise the safe_margin to 0.08, and cap your fall velocity so the character cannot travel farther than the collision margin in a single physics frame.

You build a platformer in Godot 4. One-way platforms work when you walk onto them from the side, but when the character falls from above, they pass straight through like the platform is not there. The collision shape is correct, one-way is enabled, and it works at low speeds. The problem is that at high fall velocities, the physics solver steps over the platform entirely.

Why It Happens

Godot’s physics runs at a fixed tick rate (default 60 Hz). Each tick, the CharacterBody2D moves by velocity * delta. If the character is falling at 800 px/s and delta is 0.0167s, the character moves 13.3 pixels per tick. A one-way platform with a 2-pixel collision margin can be completely skipped — the character was above it on one tick and below it on the next.

This is the classic “tunneling” problem, made worse by one-way collisions because the solver only blocks motion from one direction. From below, the platform is invisible, so once the character overshoots, it stays below.

The Fix

Step 1: Increase floor_snap_length.

extends CharacterBody2D

func _ready():
    floor_snap_length = 8.0  # default is 1.0, too small for fast falls
    safe_margin = 0.08       # default is 0.001

floor_snap_length controls how far down the character will “snap” to maintain floor contact after move_and_slide. A value of 1 means the character loses contact after a 1-pixel gap. Bumps, slopes, and fast falls all create gaps larger than 1 pixel. Set it to 4–8 for reliable platform behavior.

Step 2: Cap fall velocity.

const MAX_FALL_SPEED = 600.0
const GRAVITY = 980.0

func _physics_process(delta):
    if not is_on_floor():
        velocity.y += GRAVITY * delta
        velocity.y = min(velocity.y, MAX_FALL_SPEED)

    move_and_slide()

At 60 Hz physics, a MAX_FALL_SPEED of 600 means the character moves 10 pixels per tick. With a safe_margin of 0.08 and a platform collision shape of at least 4 pixels tall, the solver will always catch it. Without the cap, gravity accelerates the character past any reasonable margin.

Step 3: Make the platform collision shape thick enough.

A one-way platform with a 1-pixel-tall RectangleShape2D is almost impossible to land on at speed. Make the collision shape at least 4–8 pixels tall, even if the visual sprite is a thin line. The visual and physical shapes do not need to match exactly.

Dropping Through One-Way Platforms

The reverse problem: letting the player press Down to fall through. The cleanest approach is to temporarily disable the platform’s collision:

func _physics_process(delta):
    if Input.is_action_just_pressed("move_down") and is_on_floor():
        # Find the platform we are standing on
        for i in get_slide_collision_count():
            var col = get_slide_collision(i)
            var collider = col.get_collider()
            if collider.is_in_group("one_way_platform"):
                collider.get_node("CollisionShape2D").disabled = true
                get_tree().create_timer(0.2).timeout.connect(
                    func(): collider.get_node("CollisionShape2D").disabled = false
                )
                position.y += 1  # nudge through the one-way threshold
                break

The 0.2s timer gives the character time to clear the platform before the collision re-enables. Adjust the duration based on your character’s fall speed.

Verifying the Fix

Build a test scene with platforms at varying heights: 100px, 200px, 400px, and 800px above the character. Drop the character from each height and confirm it lands on the platform every time. If it falls through from the highest drop, your MAX_FALL_SPEED is still too high for your collision margin.

“One-way platforms are the most fragile collision type in any engine. They work at low speeds and break at high speeds. Cap your velocity, thicken the collision, and increase the snap length — the three-part fix is mechanical.”

Related Issues

For CharacterBody2D snapping issues on regular ground, see Godot CharacterBody2D snapping ground after jumping. For wall-jump collision bugs, see Godot CharacterBody2D wall jump not working.

Always cap fall velocity. Unlimited gravity acceleration will eventually break any collision system, not just one-way platforms.