View Full Version : strafe

02-07-2002, 01:42 PM
I am using gluLookAt to position my camera.
It's initial value is
gluLookAt( 0, 10, 15, 0, 0, 0, 0, 0, 1);
To strafe right and left, I add (or subtract) a constant value to (or from) the eye's x value and the center x value. This seems to be ok until I start rotating. I'm not worried about that yet though.
Now I want to strafe up and down but I'm not sure how. If I was using glTranslate, I would just change the y value but just adding or subtracting to the eye and center y values doesn't work. Just changing the center y value pans not strafes.
I just want to move my look vector up and down, keeping its length and orientation the same.

02-08-2002, 05:20 AM
This should help


02-08-2002, 10:37 AM
I rotated my up vector 90 degrees about y & used the strafing tutorial & it works fine.