PDA

View Full Version : Problem with moving a camera in glortho



Kal Mar
09-01-2010, 08:39 PM
Hi

I need to move a camera. I defined my projection ortho
glOrtho(-200, 200, -200, 200, -20, 200);

and a like to move a camera position at

gluLookAt(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -20, 200);

but its statement doesn't make anything.

The case is that I need to know the observer's vector dir and make some calculations.

Where is my error?

carsten neumann
09-02-2010, 06:56 AM
you pass the same value for the eye position and center point (both [0.0, 0.0, 0.0]), gluLookAt can not figure out in which direction you want to actually look (normally this is along the vector from eye to center).