Jump to content
  • Advertisement
Sign in to follow this  
AnirudhSShastry

Rotation Gizmo

This topic is 3962 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!