Hi guys,
I am using custom normals that always should be pointing in the same direction. I started adding cars into my game and they should turn and go up and down hills and so on (rotate) while not changing the normal.
When applying rotate it always rotates the normal as well even if I put it before glPushMatrix or before the glRotatef or inside the begin or wherever.
Does anyone have an idea without have to mimic glrotatef and send the rotated values to glVertex3f?
Example:
GL11.glPushMatrix();
GL11.glNormal3f(getNormal().getX(), getNormal().getY(), getNormal().getZ());
GL11.glTranslatef(getPosition().getX(), getPosition().getY(), getPosition().getZ());
GL11.glRotatef(getRotation().getX(), 1, 0, 0);
GL11.glRotatef(getRotation().getY(), 0, 1, 0);
GL11.glRotatef(getRotation().getZ(), 0, 0, 1);
GL11.glBegin(GL11.GL_QUADS);
GL11.glVertex3f(0, 0, 0);
GL11.glVertex3f(1, 0, 0);
GL11.glVertex3f(1, 0, 1);
GL11.glVertex3f(0, 0, 1);
GL11.glEnd();
GL11.glPopMatrix();


Once I’m done with the cars (which I hope is tomorrow) I’ll post a screenshot of the result.