Jump to content
  • Advertisement
Sign in to follow this  
sipickles

camera quaternion rotation around a point

This topic is 4836 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, I have a camera class that uses quaternions for rotation. Can anybody explain how I would go about fixing it on a single point, then rotating the camera (position and direction) around that? many thanks Simon

Share this post


Link to post
Share on other sites
Advertisement
I mean aimed at it, so the camera moves around at a constant distance from the point, but always looking at it.

puzzling me! :)

Si

Share this post


Link to post
Share on other sites
I'm not sure exactly what sort of behavior you want, but a standard solution is to position the camera using spherical coordinates (azimuth, elevation, and range), and orient it using a 'lookat' matrix, from which you can extract a quaternion if needed. There's probably a way to construct a 'lookat' quaternion directly, but it's not coming to me at the moment.

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!