Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dh1637

Quaternion question

This topic is 5655 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

I am programming a space sim, the engine uses quaternions. My question is about the camera in my world, here is the problem: The camera''s rotation works fine as a quaternion. However, i found that the centre of rotation was always at the origin. The translation of the camera at this point was working.(i.e. it was relative to the direction in which the camera was pointing). I thought the origin problem could be a tranlate/rotate order thing, so i swapped the order. When i did this, the centre of rotation was where it should be (the camera''s position in world) but the translation of the camera did not correspond to the direction it faces. (i.e. i press ''forwards'' and the camera moves down the negative z direction (worldspace), irrespective of the camera''s orientation.) Is there a way to change the centre of rotation? or does what i describe suggest a problem with my code? Thanks, DH

Share this post


Link to post
Share on other sites
Advertisement

  • 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!