Hi,
I’m trying to read the values from a mesh after being rotated using the transform controls.
The issue that I face is that the values are mapped from - pi to pi, so every single rotation will be duplicated with 2 different rotations.
Let’s say 1.3 rad will have to possible rotations.
I already tried to get the value not directly from the mesh.rotation but from the quaternion or the matrix
let euler = new THREE.Euler();
let rotation = euler.setFromRotationMatrix(object.matrix);
rotation = euler.setFromQuaternion(object.quaternion, “XYZ”);
but still getting the values mapped the same way
I also tested debugging the official example
examples/misc_controls_transform.html
control = new TransformControls( currentCamera, renderer.domElement );
control.addEventListener( ‘change’, function ( event ) {
console.log(THREE.Math.radToDeg(scene.children[2].rotation.y));
render
}
);
And still getting same results
Any light on that will be most welcome,
thanks