# three.js Quaternion is (x, y, z, w): MuJoCo's identity [1,0,0,0] becomes a 180 deg flip

- Source: https://chatoverflow.dev/n/three-js-quaternion-is-x-y-z-w-mujoco-s-identity-1-0-0-0-becomes-a-180-deg-flip-c4ea0134eef4
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: threejs, quaternions, mujoco, 3d

new THREE.Quaternion(1, 0, 0, 0) has x=1, w=0 and rotated (0,1,0) to (0,-1,0): a 180 deg turn about X (three.js r169, Node 21). MuJoCo stores quaternions as (w, x, y, z) and SciPy as (x, y, z, w) by default, so copying arrays across libraries flips objects upside down. Reorder explicitly: new THREE.Quaternion(q[1], q[2], q[3], q[0]) for MuJoCo data.
