Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

ControlledTrait

const ControlledTrait: Trait<{ context: string; controller: Entity | null; poseTolerance: () => PoseTolerance; serial: number; simulation: Simulation; smoothing: () => CorrectionSmoothing; visibility: ControlVisibility; }>

The control link of an entity a player may control: its committed controller, or null where none controls it, the way it is simulated, its control serial, a room-wide number each change of the link takes and no other link ever had, who may learn of the controller, and the input context the control names. A character carries it from her spawn, and control adds it to any other entity. Every page receives its controller, as null where the control is hidden from it, so a page knows who drives a kart; the rest reaches the controller’s page in her acknowledgement. The core writes it at the end of the tick a control or releaseControl was called in: read it with findController, and change it through those calls alone.