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

ViewTargetTrait

const ViewTargetTrait: CoreTrait<{ entity: Entity | null; }>

The entity a player’s camera follows, or null for the scene’s camera: her character, her kart, a player she watches, a cutscene’s rig. Set by setViewTarget and by a control with viewTarget: true as the tick ends, and cleared at once when its entity is destroyed. Her own page receives it; read it with readTrait(player, ViewTargetTrait) or useViewTarget(). As Unreal’s view target.