Physics · interface
SweptStepOptions
Explained in Your first game, Rigid bodies.
interface SweptStepOptionsimport type { SweptStepOptions } from '@driftengine/physics';Properties
| Name | Type | Description |
|---|---|---|
stepHeightoptional | number | How high a lip may be and still be stepped over. |
grazeMoptional | number | How much of a shortfall counts as a graze rather than a wall, for a body in the air, metres.MoreA 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. |
propFootprintMoptional | number | How wide something has to be before it is scenery rather than a post, metres.MoreA 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. |
facetClearMoptional | number | How much exploratory lift a vouched retry is worth where the surface reports no rise. |
riseSlackMoptional | number | A rise smaller than this is not a rise. Matches whatever the consumer's own snap ignores. |
wallNormalMinoptional | number | The least horizontal contact normal that counts as a wall.MoreBelow it the contact is a floor or a ceiling, and redirecting horizontal motion along one of those would let a body climb. |
slipAcceloptional | number | How hard a body slides off something it is merely perched on, metres per second squared. |
slipNudgeoptional | number | The speed a slip starts at, so it is not defeated by a body pressing into the contact. |
slipBlockedMoptional | number | How little movement counts as a slip having achieved nothing, metres. |
stepGraceSecoptional | number | How long after a step up a rim is still treated as a plateau rather than a wall, seconds. |