Cannon physics body and my model loaded from glb file was not syncing properly

Honest to Ogar, I read this like 3 times and still have no idea what is going on - short sentences and interpunction are the unsung heroes of this world :smiling_face_with_tear:

From the parts my questionable Engels allowed me to begrijp:

  1. Then add / subtract from the positions after syncing but before rendering the next frame. There’s no penalty for doing that (and I’d get used to this practice, sooner or later you’ll cross paths with FBX armature animations - tweaking these rotations manually will become your only hope and friend.)

  1. Same as above:
// NOTE Sync three object with cannon
carModel.position.copy(carBody.position);
carModel.quaternion.copy(carBody.quaternion);

// NOTE Adjust rotations
carModel.rotateY(-Math.PI / 2.0);

Keep in mind that in cannon everything is in world-space coordinates. Cannon doesn’t have parent-children structure like three (the only way to connect bodies is via joins, and that doesn’t involve parent-child matrix updates), so it’s always a good idea to move all your three objects to scene.children directly - and only then sync position and orientation with their cannon bodies.


  1. Just move it down.
1 Like