axis of rotation

Started by
0 comments, last by Stef3d 22 years, 3 months ago
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?
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();rotateftranslatef{Draw}

Hope I could help you
Sebo


This topic is closed to new replies.

Advertisement