📚 Encyclopedia

Games & Graphics · updated 2026-10-13

Sonic-style loop-the-loop physics

physicsplatformerloopsmathrail-physics

A rail-based way to let a platformer character run around a full circular loop, staying perpendicular to the track, completing it only with enough speed. Built for Run's level 0. AABB collision cannot do this; the trick is to leave AABB physics entirely while on the loop and integrate an angle instead.

Model

Exit conditions

  1. Jump: exit velocity = tangential velocity + jump impulse along the inward normal.
  2. Detach (falls off): v^2 / R + g_loop * cos(theta) < 0, which only happens in the upper half where cos(theta) < 0.
  3. Reversal: omega * direction <= 0 while near the bottom (cos(theta) > 0.5).
  4. Complete: theta * direction >= 2*pi. On exit, reset the movement state, then set velocity omega * R * tangent(theta).

Tuning math

Design notes

See also

Linked from

Sources: run memory (loop-physics.md, feedback-physics-architecture.md, session-v053-v057.md)