What happens if you only rotate, and remove the translate?
What happens if you only translate?
ok I will try that
What happens if you only rotate, and remove the translate?
What happens if you only translate?
ok I will try that
here is my code
void DrawShip(GLfloat position_X,GLfloat position_Y, GLfloat position_Z, GLfloat rotation,GLfloat color)
{
glPushMatrix();
glColor3f(color,0.0f,0.0f);
glRotatef(rotation,0.0f,0.0f,1.0f);
glTranslatef(position_X,position_Y,position_Z);
glBegin(GL_LINE_LOOP);
glVertex3f(0.0f,-0.25f,0.0f);
glVertex3f(-0.25f,-0.5f,0.0f);
glVertex3f(-0.5f,-0.5f,0.0f);
glVertex3f(-0.0f,0.5f,0.0f);
glVertex3f(0.5f,-0.5f,0.0f);
glVertex3f(0.25f,-0.5f,0.0f);
glVertex3f(0.0f,-0.25f,0.0f);
glEnd();
glPopMatrix();
}
But does it rotates correctly? Or around some weird point?
I tried rotate only and it only rotates
I'm pretty sure you are beyond help you've been asking this same question for years. Have you tried learning some maths?
I'm pretty sure you are beyond help you've been asking this same question for years. Have you tried learning some maths?
http://www.arcsynthesis.org/gltut/
This might be of help.