Variable jump height
Tap for a hop, hold for a full jump.
With one fixed jump, players can't make small hops, so precise platforming feels clumsy. Letting go of jump early should cut the jump short. This one rule is why Mario feels controllable. Most games also fall faster than they rise, which makes jumps snappy instead of floaty.
Try this: Tap jump quickly, then hold it. Compare the arcs. Switch it off with V and every jump is the same.
last jump arcscoin heights to hit
Grab the low coin with a tap, the high one with a hold.
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 jump height depend on how long jump is held: if jump is released while still rising, multiply upward velocity by 0.45, so a tap lasts about 0.2 s and a full hold 0.4 s, and ignore releases after the peak.
Add variable jump height (2D platformers or 3D characters, any engine). Derive jump velocity and gravity from designer values instead of guessing: maxJumpHeight (default 3 units, about 3 tiles) and timeToApex (default 0.35 s), so gravity = 2 * height / apexTime^2 and jumpVelocity = gravity * apexTime. On jump release while vertical velocity is upward, multiply it by jumpCutMultiplier (default 0.45), once per jump. Apply fallGravityMultiplier (default 1.8) when falling, and cap fall speed (default 2.5x jump velocity). Ignore releases after the apex, and make sure bounce pads, springs and knockback set a flag that disables the cut, so a held-or-released button cannot cancel them. Read the release in Update and apply it in the physics step so it isn't lost at high frame rates. Expose all values as tunables.
Where it's used
- 2D platformers: Mario, Celeste and Hollow Knight all cut the jump on release
- 3D platformers: hop-or-leap control on the same button
- Metroidvanias: precise short hops between spikes
- Mobile games: tap vs press-and-hold jumps
- Springs and launchers: deliberately exempt from the cut
Common mistakes
Setting velocity to zero on release (an ugly hard stop), cutting again every frame the button is up, letting the cut apply to spring or knockback launches, and guessing gravity by hand instead of deriving it from height and time.
Writing this with an AI assistant? See our best AI coding assistants for game developers.
Missing a concept? Request one.



