Opengl rotation problem
Objects always rotate about the origin. Please describe your problem instead of stating a fact and asking for a fix to something that behaves as it should.
You handle that just like you do at any time in OpenGL; rotate the object at the origin, not at its final position.
Make sure you load the identiy matrix, then translate for the object, then rotate for the object. It should look like this:
glLoadIdentity();
glTranslatef(x, y, 0.0f);
glRotatef(rotation, 0.0f, 0.0f, 1.0f);
Is this what you are having trouble with? It is hard to tell from your post. Try rephrasing the question and posting some code.
glLoadIdentity();
glTranslatef(x, y, 0.0f);
glRotatef(rotation, 0.0f, 0.0f, 1.0f);
Is this what you are having trouble with? It is hard to tell from your post. Try rephrasing the question and posting some code.
Quote:Original post by fllipperr
My problem is that it looks like the screen spins not the objects
You should read this.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement