10 · Physics & collisions · 2D (and 3D)

One-way platforms

Jump up through it, land on top of it.

Platforms you can jump up through from below but stand on from above are everywhere in platformers. The rule is simple: only collide when the character is falling and their feet were above the platform last frame. Add "hold down and jump to drop through" and players can move freely between floors.

←→ moveSpace or ↑ jump↓ + jump: drop throughO one-way on/off◀ ▶, Jump, ▼ Drop

Try this: Jump up through the platforms, then hold ↓ and press jump to drop down. Switch one-way off with O to bonk your head.

Jump up through a platform.

Prompt bit

Works for 2D or 3D in any engine (Unity, Unreal, Godot, web). Paste the short one for a quick fix, or the detailed one when you want it done properly.

Make one-way platforms: collide only when the character is moving down and their feet were at or above the platform top on the previous step, and let down plus jump ignore that platform for 0.25 s so they drop through cleanly instead of snapping back.

45 words · one sentence to paste as is

Where it's used

Common mistakes

Colliding whenever velocity is downward even if the feet are already below the top (characters pop up through), drop-through that ignores every platform at once, ground checks that still see the platform while dropping, and side collisions with the platform edge.

Writing this with an AI assistant? See our best AI coding assistants for game developers.

Missing a concept? Request one.

Related concepts

New concepts, in your inbox.

One short email when we add new concepts, plus our weekly roundup of AI tools for game devs. Unsubscribe any time.