Advertisement

Why am I retarded?

Started by March 30, 2001 12:00 PM
-1 comments, last by Jenison 23 years, 10 months ago
Ok...I have 4 objects each at the +/- 10 coords of the z and x plane. However, when I move my camera in the -x direction...I move AWAY from the red triangle....why? So when i''m facing the red triangle (camera at 0,0,0)...and move x coor is like -4...camera moves away from it glLoadIdentity(); glRotatef(oPlayerCamera->rotx,1.0f, 0, 0); glRotatef(oPlayerCamera->roty,0, 1.0f, 0); glTranslatef(oPlayerCamera->x,oPlayerCamera->y,oPlayerCamera->z); ... glPushMatrix(); glTranslatef(10.0,0.0,0.0); glBegin(GL_TRIANGLES); glColor3f(1.0f,1.0f,1.0f); ... glEnd(); glPopMatrix(); glPushMatrix(); glTranslatef(-10.0,0.0,0.0); glBegin(GL_TRIANGLES); glColor3f(1.0f,0.0f,0.0f); ... glEnd(); glPopMatrix(); glPushMatrix(); glTranslatef(0.0,0.0,10.0); glBegin(GL_QUADS); glColor3f(1.0f,1.0f,1.0f); ... glEnd(); glPopMatrix(); glPushMatrix(); glTranslatef(0.0,0.0,-10.0); glBegin(GL_TRIANGLES); glColor3f(1.0f,0.0f,0.0f); ... glEnd(); glPopMatrix();

This topic is closed to new replies.

Advertisement