space ship

well I am trying to draw a space ship and have it move up and rotate around its origin and also have it follow its own nose. Basically I want it to move like in asteroids. I have almost figured out this problem. So far I moved the coordinate axis 5 units to the right and then rotates the ship and then moves the ship up. My problem is that now I want the ship to rotate around its own center or origin.


glTranslatef(5.0f, 0.0f, 0.0f);

glRotatef(angle, 0.0f, 0.0f, 1.0f);

glTranslatef(0.0f, up, 0.0f);



I guess this could help you to understand model-view transformations. :slight_smile: