Jump to content
  • Advertisement

Archived

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

Pres

Matrix Camera Rotations (common probably)

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

The problem is that once the camera is no longer pointing down the z-axis of the identity matrix, rotations upon world space no longer look like "camera" rotations. Example : On my keyboard the z and x keys are supposed to control the camera''s roll. Which they do if the camera is at identity (because I rotate around the z-axis). I rotate the camera around the Y-axis by 90 degrees - now any change along the z-axis affects not the roll but the pitch of my camera. This problem is obviously as old as the hills, but how to solve it ? Quaternions, while probably the best solution, are not what I''m after, nor gluLookAt type solutions, just raw matrix stuff.

Share this post


Link to post
Share on other sites
Advertisement
because you wont get away with global rotations. rotate around the cameras local z-axis (if using opengl i would just load the matrix to the stack, rotate and read it back).

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!