Add 90 degrees to a Quaternion in Away3d

329 Views Asked by At

I'm attempting to rotate a Quaternion up 90 degrees on the Y axis in Away3d. I'm using an ANE to get Quaternion values from device motion, to set the camera view.

This rotates the angle up,

            qu.fromAxisAngle(Vector3D.X_AXIS,Math.PI/2);
            q.multiply(q, qu );

But then seems to switch the other angles, i.e. now panning the device rolls the view.

1

There are 1 best solutions below

0
beek On BEST ANSWER

Changing the order worked

q.multiply(qu, q );