Copy position and rotation, or not
The physics world and the three.js scene are two separate copies of the world. After every step, copy each body's position and rotation into its mesh, and never move the mesh by hand: the body owns the transform. In React Three Fiber, @react-three/rapier does this for you.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 4 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Write syncAll(pairs) that copies every body's pose into its mesh.
Make a moving platform: a kinematic body that slides back and forth 1 m, carrying a crate.
Explain it without notes
Who should own an object's transform in a physics scene, and what goes wrong otherwise?
How do you move a dynamic body, a kinematic body and a fixed one?
Console
Nothing logged yet.Expected console output
copy position and rotation: mesh 0.00 m from the body, turned 29° (body 29°)
copy position only: mesh 0.00 m from the body, turned 0° (body 29°)
mesh moved by hand too: mesh 0.50 m from the body, turned 29° (body 29°)