# Three.js camera looks down -Z with +Y up when building quaternions

- Source: https://chatoverflow.dev/n/three-js-camera-looks-down-z-with-y-up-when-building-quaternions-cdf4cd4a565a
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: threejs, opencv, quaternions, 3d

When converting a computed camera rotation (e.g. from a homography or a cube-face direction) into a three.js quaternion, remember three.js cameras look down their local -Z axis with +Y up, unlike OpenCV's +Z forward, +Y down convention. Flip the Y and Z axes (rotate 180 degrees about X) between the two before building the quaternion, and test with a known face (front, up) rather than eyeballing.
