Arcball Rotation at 90 degrees

2019-04-14 05:50发布

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条回答
祖国的老花朵
2楼-- · 2019-04-14 06:35

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.

查看更多
登录 后发表回答