• Advertisement
Sign in to follow this  

rotating

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

Advertisement
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
Sign in to follow this  

  • Advertisement