Sign in to follow this  
iedoc

rotating

Recommended Posts

im mostly using it for a third person thing, and i tried that, its probably the way, but when i did it, it worked when i started, but when i moved, the object moved a different way.

Share this post


Link to post
Share on other sites
Well if you use glRotatef it will rotate the axis and hence the movement. For example if you do glRotatef(90, 0, 1, 0) now the y-axis will become the x axis. So if you do glTranslatef(0, 10, 0) you will end up moving 10 units left rather than up. You might want to translate first and then rotate ie if you are using glTranslate.

You might also want to look into glMultmatrix* and see if it might help you.

Share this post


Link to post
Share on other sites
Dude, thanks, that almost worked switching the translate and rotate around. but now it won't rotate. it moves around with me, but it won't turn with me, so if i turn, it will stay.

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