Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any maths involving Camera matrix causes HoverController to do something strange #715

Open
bknill opened this issue Mar 15, 2015 · 0 comments

Comments

@bknill
Copy link

bknill commented Mar 15, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant