Physics · interface
EscapeVeto
A world's own veto over a direction the collider set says is clear.
Explained in Your first game, Rigid bodies.
interface EscapeVetoimport type { EscapeVeto } from '@driftengine/physics';In depth
Declared structurally, so nothing is imported in either direction — the same shape
GroundProbe uses on CharacterController, and for the same reason: a consumer with an
analytic surface has a second authority about where a body may be, and a probe that consulted
only the colliders would hand back directions the ordinary move refuses.
Absent means the collider set is the whole world, which is every consumer that has not asked.
Methods
horizontal
horizontal(axis: Axis, reached: number): booleanWould the world refuse a body that had moved to reached along a horizontal axis?
| Parameter | Type | Description |
|---|---|---|
axis | Axis | |
reached | number |
More
reached is the coordinate on that axis the probe arrived at.
below
below(): booleanWould the world undo a downward escape from where the body is now?
More
Down only. A body above its surface falling is the ordinary case and a surface has no opinion about it.