Jump to content
  • Advertisement

Archived

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

Stef3d

axis of rotation

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

I am working on a small asteroids type game. I am having trouble figuring out how to rotate and trnslate the ship based on its own coordinate axis. when i do this: glRotatef(rot,0,0,1); glTranslatef(0,ytrans,0); draw_ship(); it uses the world coordinate axis for its rotation. how do I rotate around the ships axis?

Share this post


Link to post
Share on other sites
Advertisement
Hi,

I hope I can help you, b''cause I''m new in OpenGL
Before I do any transformations and rotations, I set an
GLLoadIdentity();
So the World Matrix is, new-set.

GLLoadIdentity();
rotatef
translatef
{Draw}
[/CODE]
Hope I could help you
Sebo


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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!