Physics · interface

SweptStepOptions

Explained in Your first game, Rigid bodies.

interface SweptStepOptions
import type { SweptStepOptions } from '@driftengine/physics';

Properties

NameTypeDescription
stepHeightoptionalnumberHow high a lip may be and still be stepped over.
grazeMoptionalnumberHow much of a shortfall counts as a graze rather than a wall, for a body in the air, metres.
More

A facet seam is a few centimetres and mid-flight is exactly where one is most likely to be clipped in passing rather than run into. A genuine wall does not pass it: hit one square and the move is near zero regardless of how small it was.

propFootprintMoptionalnumberHow wide something has to be before it is scenery rather than a post, metres.
More

A deck's own geometry spans most of a cross-section by construction, metres in at least one direction; a lamp post is fourteen centimetres. The width test alone tells them apart, and it is what keeps the vouched retry from walking a body through a real obstacle.

facetClearMoptionalnumberHow much exploratory lift a vouched retry is worth where the surface reports no rise.
riseSlackMoptionalnumberA rise smaller than this is not a rise. Matches whatever the consumer's own snap ignores.
wallNormalMinoptionalnumberThe least horizontal contact normal that counts as a wall.
More

Below it the contact is a floor or a ceiling, and redirecting horizontal motion along one of those would let a body climb.

slipAcceloptionalnumberHow hard a body slides off something it is merely perched on, metres per second squared.
slipNudgeoptionalnumberThe speed a slip starts at, so it is not defeated by a body pressing into the contact.
slipBlockedMoptionalnumberHow little movement counts as a slip having achieved nothing, metres.
stepGraceSecoptionalnumberHow long after a step up a rim is still treated as a plateau rather than a wall, seconds.