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

ControlOptions

What control and tryControl take beside the controller and the entity.

Property Type Description
context? InputContextHandle The input context live on the player’s page while the player controls it: where two live contexts’ inputs share a key, the higher priority takes it. Left out, it names none.
from? Entity | null The controller the caller expects the entity to have now, null for none: the call is refused with ControlRefusal.ControlledByOther where another holds it, or claimed it earlier this tick, so two claims on one seat in one tick get one winner. Left out, the control takes the entity from whoever holds it.
poseTolerance? Partial<PoseTolerance> How far the player’s page’s pose of the entity may differ from the room’s before it corrects the entity, where the player predicts it: each part left out takes defaultPoseTolerance’s. Raise it for a fast body whose last digits differ by more, such as a kart at 30 m/s.
simulation Simulation How the entity is simulated while the player controls it. Required: a kart left a round trip late by a forgotten option is a bug no player should find.
smoothing? Partial<CorrectionSmoothing> How the player’s page draws a correction of the entity, where the player predicts it: each part left out takes defaultCorrectionSmoothing’s.
viewTarget? boolean Makes the entity the player’s view target as the tick ends, the one the player’s camera follows, as setViewTarget does: the last of the two in a tick wins. A room controller has none.
visibility? ControlVisibility Which pages learn who controls it: every page, as left out, or the controller’s alone, ControlVisibility.Controller, so a disguised player’s prop reads as no one’s on every other page.