That is correct the openGL default is looking down the - z axis in ortho mode.
You world co-ordinates will depend a lot on the ortho view setup or perspective view.
Just take the values of you view to determin where your object need to be located.
Was this a typo error, -(-5.0), is the same as 5.0?
gluLookAt (0.0, 0.0, -(-5.0), 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
But if you use gluPerspective then it is rotated to look down the + z axis.
example for movement:
if (direction == 1) z–; // forward
if (direction == -1) z++; // backward
gluLookAt (0.0, 0.0, z, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
Originally posted by eXor:
[b]I’m a complete beginner so today I was looking at gluLookat and thinking about using the camera position as an absolute world position. I place the camera at 0,0,5 observing a triangle at 0,0,0 However this is a bit confusing because the camera is initially looking down the negative z axis and a forward move means a decreasing z value so I cheated a bit by using
gluLookAt (0.0, 0.0, -(-5.0), 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);[/b]
[This message has been edited by nexusone (edited 01-02-2003).]