Sign in to follow this  

rotation in opengl

Recommended Posts

Original post by phil67rpg
I am trying to rotate a space ship in open gl this is for a 2-d game
What part do you need help with? Assuming the ship is rendered using some OpenGL primitive (such as a quad), you should be able to position and orient it the way you want using glRotate*() and glTranslate*(), like this:
glTranslatef(shipX, shipY, 0.0f);
glRotatef(shipAngle, 0.0f, 0.0f, 1.0f);

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