laeuchli

12-27-2000, 01:38 PM

Could someone please please please tell me what in the world is wrong with this????

Thanks,

Jesse www.laeuchli.com/jesse/ (http://www.laeuchli.com/jesse/)

void GLEngine::turn(float x)

{

float tempx=lookDir.x-eye.x;

float tempz=lookDir.z-eye.z;

float rad=x*0.01745f;

float newx=tempx*cos(rad) - tempz*sin(rad);

float newz=tempz*cos(rad) + tempx*sin(rad);

lookDir.x=newx+eye.x;

lookDir.z=newz+eye.z;

gluLookAt(lookDir.x, lookDir.y, lookDir.z,

eye.x, eye.y, eye.z,

0.0, 1.0, 0.0);

}

void GLEngine::move(float x)

{

lookDir.z+=x;

gluLookAt(lookDir.x, lookDir.y, lookDir.z,

eye.x, eye.y, eye.z,

0.0, 1.0, 0.0);

}

Thanks,

Jesse www.laeuchli.com/jesse/ (http://www.laeuchli.com/jesse/)

void GLEngine::turn(float x)

{

float tempx=lookDir.x-eye.x;

float tempz=lookDir.z-eye.z;

float rad=x*0.01745f;

float newx=tempx*cos(rad) - tempz*sin(rad);

float newz=tempz*cos(rad) + tempx*sin(rad);

lookDir.x=newx+eye.x;

lookDir.z=newz+eye.z;

gluLookAt(lookDir.x, lookDir.y, lookDir.z,

eye.x, eye.y, eye.z,

0.0, 1.0, 0.0);

}

void GLEngine::move(float x)

{

lookDir.z+=x;

gluLookAt(lookDir.x, lookDir.y, lookDir.z,

eye.x, eye.y, eye.z,

0.0, 1.0, 0.0);

}