Skip to content

TrackTriggerTrait

const TrackTriggerTrait: Trait<{ bottom: number; end: number; entered: boolean; exited: boolean; inside: boolean; lap: boolean; left: number; right: number; start: number; top: number; }>

Defined in: packages/engine/src/gameplay/track/traits.ts:87

A region of a track in its own coordinates, a box that reports a mover riding through it: a rock’s hit box, a coin, a finish line. A mover has no physics body, so the step tests its track coordinates rather than a collider. A bound left out is open. The track is on TrackRef, and only a mover on that track is tested.