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

PhysicsOptions

What definePhysics takes: the scene’s settings, each one optional.

Property Type Default value Description
gravity? readonly [number, number, number] [0, -9.8, 0] The pull on every dynamic body, in metres a second squared, as a vector, so a game pulls sideways or not at all. A character falls along its y component alone.
killBelowHeight? number | null -500 The height in metres below which a dynamic body or a living character is out of the world, as Unreal’s KillZ and Roblox’s FallenPartsDestroyHeight: the step emits FellOutOfWorldEvent on it first. At the next step, unless it stands above the height again, a body or an NPC is destroyed, and a player’s character does what characters()’ outOfWorld says. null keeps everything.
solverIterations? number 4, Rapier’s The solver’s passes within one tick, Rapier’s numSolverIterations under Unity’s name: more steady a tall stack or a long chain, at a cost on every step.