threejs-physics

Installation
SKILL.md

Physics with Rapier

Rapier (@dimforge/rapier3d-compat 0.21, @react-three/rapier 2.2) is the default physics engine for three.js work: WASM, deterministic, with character controllers and good React bindings. Most physics bugs are scale and shape problems, not engine problems: bodies in centimeters fall 100 times too slowly, triangle-mesh colliders on moving bodies tunnel or explode, and rendering at a variable rate while stepping at it makes motion jitter.

Process

  1. Inspect every model that gets a collider (threejs-model-inspect): scale must be meters (fix scale-large first; physics in centimeters behaves like slow motion), and note which nodes are the floor, walls and props.
  2. Choose collider shapes per object, cheapest that fits:
Installs
7
First Seen
Oct 27, 2026