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

DynamicBodyOptions

A body the solver moves.

  • BodyOptionsBase
Property Type Default value Description
angularDamping? number 0 How fast its spin fades, per second.
bodyType "dynamic" | Dynamic undefined -
canSleep? boolean true Whether it sleeps once at rest.
centerOfMass? Triple where its colliders put it Its centre of mass in its own axes, as Unity’s centerOfMass: low, and a kart stays on its wheels.
collisionLayer? CollisionLayerHandle CoreLayers.default The layer it stands in, a handle a plugin declared.
collisionMask? CollisionMask every layer The layers it meets: a pair touches only when each one’s mask holds the other’s layer.
continuousCollision? boolean false Rapier’s continuous collision, ccd there: a fast body stops at a thin wall rather than passing through it within one step.
enabledRotations? readonly [boolean, boolean, boolean] all true Whether it turns about x, y and z.
enabledTranslations? readonly [boolean, boolean, boolean] all true Whether it moves along x, y and z.
gravityScale? number 1 How much of the scene’s gravity pulls it.
ignore? readonly Entity[] undefined Entities it never touches, such as a rider’s own dragon, without spending a layer.
linearDamping? number 0 How fast its speed fades, per second.
mass? number density times volume Its total mass in kilograms, over its colliders’ densities.
reportContacts? boolean false Whether it raises CollisionEnteredEvent and CollisionExitedEvent as it starts and stops touching another entity, as Rapier’s active events and Godot’s contact_monitor are asked for, so a pile of crates nobody watches costs nothing. A trigger reports always.