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

readViewPosition

readViewPosition(source, entity, rewind): ReadonlyVector3 | null

Where entity stood as the player’s screen showed it at the moment rewind names. A flight is read at the tick. An entity the player controls and the page predicts is read where it stands now. Any other is read where the stream drew it then, from the sends the room and the player’s page both keep. In a world with no sends, as a game played alone, it is read where it stands now. The same on both ends but where the room’s rewind bounds held the step. Null for one the player’s screen never showed, and one that teleported or respawned since. Written in place: read it at once.

Parameter Type
source QuerySource
entity Entity
rewind Rewind

ReadonlyVector3 | null

const at = readViewPosition(step, command.payload.ball, command);