PDA

View Full Version : gluLookAt



MrShoe
04-23-2001, 11:56 PM
I have a kewboard function controlling the variable movement, when you press forward, movement decreases, pressing backwards increases the value of movement.
then i say
glulookat(0.0, 0.0, movement,
0.0, 0.0, movement-1,
0.0, 1.0, 0.0);
now please tell me why the program causes me to zoom out even if i ress forward?

Bob
04-24-2001, 12:24 AM
The Z-axis is pointing out from the screen. If you increase the value of movement, which you do when you press forward, it will move the viewpoint "out of the screen", because this is the direction the positive Z-axis is pointing. This will look like a movement backwards.