OK, I need to figure out what I’ve done to mess up my viewing system. I use gluLookAt() to move a camera in object space, but when I built my new box I rebuilt my app from the ground up. Everything else works, but I have not done my viewing correctly. Here’s the current source.
//Structure
typedef struct tagCAMERA
{
float X, Y, Z;
float LX, LY, LZ;
short int Heading, LookUp;
} CAMERA;//In the engine…
CAMERA Base;
…
void DrawScreen()
{
Base.LX = Base.X + cos(Base.Heading * (pi / 180)) + 64;
Base.LY = Base.Y + sin(Base.LookUp * (pi / 180)) + 64;
Base.LZ = Base.Z + sin(Base.Heading * (pi / 180)) + 64;glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
gluLookAt(Base.X, Base.Y, Base.Z, Base.LX, Base.LY, Base.LZ, 0.0, 1.0, 0.0);
}
What’s wrong with this? Also, should I use glNormal3f() as well? If so, what exactly does it do? Heading is which way in the world the player is looking, ranging from 0 to 359. LookUp ranges from -90 to +90. The way i thought I had it setup was to look at a vector about 64 units away, but when i turn left or right, the view just rotates in a tiny circle, very slowly. Thanks for the help.