Skip to content

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

@bknill

Description

@bknill

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions