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

BodyDeclaration

BodyDeclaration = { body?: undefined; collider?: ColliderDeclaration; } | { body: FixedBodyOptions; collider: ColliderDeclaration; } | { body: KinematicBodyOptions; collider: ColliderDeclaration<KinematicColliderShape>; } | { body: DynamicBodyOptions; collider: ColliderDeclaration<DynamicColliderShape>; }

A body and its colliders as an entity declares them: a collider with no body is a fixed body; a body names its kind, and its colliders take the shapes that kind allows, so a triangle mesh, a heightfield or voxels on a dynamic body fails to typecheck.