The near and far planes for gluPerspective are measured from the camera "eye." So, if I change the direction of the "at" vector for gluLookAt, the two planes will be in the direction of the "at" point and will be measured from the "eye" point, right?
Thank you helping me.

The view area is a box with near being the face near the camera and far end of box.
Since the view is set by a angle the box on the near end is smaller and gets bigger at the end of the box.

Now what glulookat does is just rotates/translates the view box, based on eye-position, at and camera rotation.

I hope this helps

Originally posted by New kid on the board:
The near and far planes for gluPerspective are measured from the camera "eye." So, if I change the direction of the "at" vector for gluLookAt, the two planes will be in the direction of the "at" point and will be measured from the "eye" point, right?
Thank you helping me.

10-25-2002, 07:14 PM

Here is my problem: we are supposed to walk around in a 3d work. I'm using gluLookAt to move the camera around. It seems logical to move the camera around. The problem is, when I move towards or the side of the cube, the cube looks distorted. It look longer and just plain messed up. Why is that happening? Is it better to use the gl transformations functions, or can I somehow use gluLookAt?

#include <iostream.h>
#include <GL/glut.h>

// array that holds the position of the camera
GLdouble eye[3];

//array that holds the direction of where the camera is pointing to
GLdouble at[3];

I fixed the distortion problem by changing the field of view to 45. I had it at 120 because that's our field of vision. But would it be easier to implement the program using the gl transformation functions or using gluLookAt?

Mazy

10-26-2002, 01:03 AM

that totally depends on how you move.. when you use lookat you need an aimpoint which is nice some times but can be a hell in other situations. So i have no real answer http://www.opengl.org/discussion_boards/ubb/smile.gif

10-26-2002, 05:50 AM

I'm just moving around in a 3D world--kind of a low grade version of Quake, I guess.

or with
gluLookAt(player view, direction_lookint_at, rotation of view)

Originally posted by Not very old kid:
I fixed the distortion problem by changing the field of view to 45. I had it at 120 because that's our field of vision. But would it be easier to implement the program using the gl transformation functions or using gluLookAt?

[This message has been edited by nexusone (edited 10-26-2002).]

[This message has been edited by nexusone (edited 10-27-2002).]

10-27-2002, 05:30 AM

Why do I have to rotate about the x, y, and z axises? If I am moving about the x-z plane, should I rotate only the y-axis?

10-27-2002, 05:43 AM

Is glLookAt similar to gluLookAt? Or is it just a typo?

harsman

10-27-2002, 06:40 AM

It's a typo. Just use gluLookAt if it works for your needs. No need to complicate things if you don't need it.

nexusone

10-27-2002, 06:50 AM

Well the player my want to look right or left (x-axis rotation) or maybe up and down (y-axis rotation), or look as if he is standing on his head (z-axis rotation).....