Physics · const
GROUNDED
A kinematic capsule character: the mechanism, and the feel that rides on it.
Explained in Your first game, Rigid bodies.
const GROUNDED = 0import { GROUNDED } from '@driftengine/physics';In depth
Kinematic and not a dynamic body. A dynamic character falls over, cannot be steered crisply,
and turns every design question about movement into a question about torque. Every shipping
engine ships a kinematic controller for exactly that reason, and this one sweeps the same
PhysicsWorld everything else queries, so it sees moving bodies as well as scenery.
Feel is here too, and that is a decision AGENTS.md records. That file's worked example for
the engine/game boundary once said a controller was game because "friction, coyote time and slide
boost are one game's feel". The same file's audio rule draws the line correctly: the DSP graph
is engine and which sounds play is game. A controller that takes a friction curve and a
coyote-time duration takes numbers and time, which is what that file says engine APIs take; what
stays game is which numbers. What would make this wrong is a parameter that only means
something in one game.
Coyote time and jump buffering are counted in ticks, never accumulated in a float of seconds. That is the determinism contract reaching into the feel layer, and the difference between a replay that matches and one that drifts by a frame after an hour of uptime.