PDA

View Full Version : How to move



08-06-2002, 07:53 PM
How do I move to front, back, right and left?

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-6.0f);
glRotatef(rot_x,1,0,0);
glRotatef(rot_y,0,1,0);
glRotatef(rot_z,0,0,1);

Gavin
08-07-2002, 01:19 AM
What sort of movement? ist person or...? What is wrong with what you have done so far?

pongsak.a
08-07-2002, 01:38 AM
Did you mean how to move your view?
see gluLookAt() to set your camera position

08-07-2002, 09:11 AM
Yeah. Is 1st person movement. I just want to move forward, but I dont know hwo to calculate wheres front.