mrdoob/three.js — Issue #1178: Get rotation angle from PerspectiveCamera w/RollControls
Author: njmcode
Created: 2012-01-24 15:58:59+00:00
State: open

Hello,

Apologies if this seems obvious but I'm new to Three.js and 3D maths in general.

I'm using RollControls with a standard PerspectiveCamera in my 3D WebGL scene. I want to be able to get the rotation angle(s) of the camera.

I have tried querying camera.rotation, but it always returns (0,0,0) - presumably because RollControls uses matrices to perform the rotations and movement.

What is the best practice for getting x, y, and z rotation angles for the camera in this case?