From: Ash Tyndall Date: Sat, 22 Oct 2011 02:54:09 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=15efeb59d58720e4884f6b6ef374e1e22d2f4417;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index b724f24..997d8b0 100644 --- a/scene.c +++ b/scene.c @@ -308,9 +308,9 @@ void motion(int x, int y) { // w: left/right, h: near/far //so.x, so.y, so.z //sceneObjs[curObject].x += (x - startx)*leftrightFactor; - printf("cam angle: %f\n", camAngle*camAngleFactor); - sceneObjs[curObject].x += (x - startx) * sin(90 - camAngle*camAngleFactor); - sceneObjs[curObject].z += (x - startx) * cos(90 - camAngle*camAngleFactor); + printf("cam angle: %f\n", rotate*rotateFactor); + sceneObjs[curObject].x += (x - startx) * sin(90 - rotate*rotateFactor); + sceneObjs[curObject].z += (x - startx) * cos(90 - rotate*rotateFactor); } else if ( buttonSelected == GLUT_MIDDLE_BUTTON ) { // w: big/small float diff = (x - startx);