Sign in to follow this  

Object rotates when modelview matrix rotates instead of world

Recommended Posts

Hello. I'm rather new at this. I just created a matrix class and a function to rotate it given input x,y,z angles. To render the scene I have been loading my camera coordinate matrix into the modelview matrix (inverting all translational coordinates). The rotation part seems to be working right (I check the matrix numbers) and moving the camera with the translational coordinates works. The strange thing is that when I try to rotate the camera, the points I have made all rotate around the original origin, rather than the camera. Am I loading the matrix wrong? Thanks

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this