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

setBody

setBody(authority, entity, changes): void

Changes entity’s body in place on the world authority decides for: its kind, its layer and mask, what it pushes and ignores, its mass and the rest. The body keeps its velocity where both kinds have one, its sleep and the pairs it holds; each change streams, and a body that a change could leave unsupported wakes what rested on it.

Parameter Type
authority EntityAuthority
entity Entity
changes BodyChanges

void

setBody(step, crate, { bodyType: RigidBodyType.Kinematic }); // picked up