Arcball Rotation at 90 degrees

1.3k views Asked by At

I have successfully implemented Arcball rotation through quaternions, but am confused at what to do when the direction vector of the camera is parallel to up vector. Currently I am just restricting the rotation along the x-axis (the pitch) when the dot product of the direction vector and the up vector exceeds 0.99. In Maya (or Max, XSI where arcball rotation is used) for example, you can rotate around in a full circle very smoothly. I am hoping for a solution similar to that of Maya's rotation.

Thankyou

1

There are 1 answers

5
andand On

You need to adjust both the view normal vector (VNV) and the view up vector (VUV) and rotate both of them together so they always remain orthogonal to each other. It is sometimes useful to keep track of a "right" (or "left") vector as well which is just the cross product of the normal and up vectors.