gluLookAt

In the OpenGL bible it says that the third vector you give gluLookAt specifies ‘up’. I’m getting weird results from this. Could someone please elucidate? Does this vector need to be perpendicular to the line the camera looks down? Is it given in world co-ords or what?

Thanks,

Hi,

Vectors in gluLookAt are
first: camera position
second: where camera is looking at
third: the up vector - this vector rotates screen view, not changing postion and looking at only rotates. For example try seeting up vector first to (0, 1, 0) and then to (1, 0, 0) You will see the diffrence
In the first camera is “staying”, in second is rotated with 90 degrees.

Hope it helps