All examples · Physics

Falling cubes

What this example shows

The intro to rigid bodies through the opt-in nacatamalon/physics3d adapter (Erin Catto's Box3D, in WASM). The engine keeps the colliders but cannot move them; installing the adapter steps Box3D on a fixed timestep and writes each body's place and facing back onto its object.

The facing is a whole turn (a quaternion) rather than three angles, which is what lets a cube tumble end over end. Click the canvas to kick the cubes.

Starting