Jump to content
  • Advertisement

Archived

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

gotG

rotations

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

im having a little prob with 3d rotation, i understand the concept and is familiar with the math its just i have a tiny implementation problem: I build a camera class the Camera is repersented by a 4x4 matrix it has the usual info in it such as the viewdirection, up, and right vectors into. i also can get the worldspace location of the camera. and infact theres nothing wrong with the math part. suppose i look up by Pi/4 in that case my direction vector is now 45 degrees off the xy plane,and my up vector being perpendicular to that vector is rotated back also by 45degrees, ok here comes the problem! when i want to apply another rotation at this point, say to the right/left. the view would pitch, since the up vector that iam rotating around is no longer 0,1,0. i i want the view to still rotate around the orignal up direction which in this case is the y-axis. But no matter how i try to rotate it the final transformation matrix always comes out as described above. can someone help??

Share this post


Link to post
Share on other sites
Advertisement
Another solution is to convert the camera orientation into angles (rotation and elevation) and work with those, and then calculate the up, right, and forward vectors only as you need them.

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!