PDA

View Full Version : glulookat not working :-(



laeuchli
01-18-2001, 10:33 AM
void GLEngine::turn(float x)
{
ewAngle+=x*0.017453292519943295769236907684886;
eyeVX=-sin(g_ViewAngle);
eyeVZ=cos(g_ViewAngle);
lookDir.x=((eyeVX+eye.x)*2);
lookDir.z=((eyeVZ+eye.z)*2);
}
void GLEngine::move(float x)
{
eye.x+=eyeVX*x;
eye.z-=eyeVZ*x;
lookDir.x+=eyeVX*x;
lookDir.z-=eyeVZ*x;
}
void GLEngine::climb(float x)
{
eye.y+=x;
lookDir.y+=x;
}
could someone help me figure out why this code doesn't work???

Bob
01-18-2001, 11:45 AM
>> lookDir.x=((eyeVX+eye.x)*2);
>> lookDir.z=((eyeVZ+eye.z)*2);

What's '*2' doing? I dont think it's suppose to be there.