Any maths involving Camera matrix causes HoverController to do something strange
Opened this issue · 0 comments
bknill commented
Hi,
I've reported this on the forum but as there's no support I'm assuming it's a bug. It might be related to #713
I'm updating the camera with a device motion Quaternion
camera.transform = q.toMatrix3D();
I'm then attempting to get Pan and Tilt values from this Quaternion, so when it switches back to hoverController on touch, it's facing the same way
As soon as I do any maths on this Quaternion (doesn't actually matter what Maths is involved)
_currentPan = q.toEulerAngles(Vector3D.Y_AXIS).z * 180/Math.PI;
_currentTilt = q.toEulerAngles(Vector3D.Z_AXIS).x * 180/Math.PI;
When the hoverController is enabled, the view is flipped upside down and to a strange angle.