Rotation Gizmo

Started by
-1 comments, last by AnirudhSShastry 16 years, 2 months ago
Hi folks, I was trying to implement a Rotation Gizmo (the difference from a Trackball being that the rotation sphere is not centered around the camera's taget, but instead around the object's center). I'm a lil mixed up with the spaces after several ideas. The first idea was to transform the eye ray into object space, compute the intersection points with the object's bounding sphere and map the movement on the screen to rotation on that bounding sphere. This may be one right way to do it, but it is fairly involved mathematically. Another idea was to transform the rotation "pivot" of the object before rotation to the camera's target position, apply the rotation and then transform the object back to it's world space position. This would be a lot simpler, but I'm not sure what exactly the transforms would be. I'm not entirely sure how to transform the object from world space (actually, before the transform, the object would be in object space) to the camera's target space and back again. I'd be grateful if anyone could suggest how to do this, or even suggest a different/easier method. Thank you very much.

This topic is closed to new replies.

Advertisement