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

setNextPose

setNextPose<Target>(authority, entity, poseChanges): BodyRefusal | null

Sets where a kinematic body stands after the next physics step, as Unity’s MovePosition and MoveRotation do: the step moves it there with the velocity of the move, so a lift carries the crate on it and a swinging door pushes one aside, and a query before the step meets it where it stood. A second call in one tick replaces what the first set, the position and the rotation each, so a spin and a bob both land. Returns null, or in a deployed world the reason it refused.

Type Parameter
Target extends Entity
Parameter Type
authority EntityAuthority
entity BodyTarget<Target, Kinematic>
poseChanges PoseChanges

BodyRefusal | null

setNextPose(step, lift, { position: top });