Hi…
I’m trying to write a simple application that allows one to place an object in the 3D space (by specifying translation/rotation coordinates), and to view the scene from any point in the space (by specifying eye coordinates and sight direction). I’m using gluLookAt(), as I have seen in many guides and tutorials.
But something doesn’t work well. If I call
glLookAt(1.0, 0.0, -5.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0);
and then
glTranslatef(1.0, 0.0, 0.0);
I think I should see the object in the center of my viewpoint (because it is in 1,0,0; my eye is in 1,0,-5, and looks at 1,0,0). But this doesn’t happen: I see my object slightly shifted on the right.
Could anyone help me?
Thanks!!!