X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=997d8b0798496365a5ab64a00cb8dd932e62e29a;hp=b724f2412e5dc9e90e36e25bc832fc28ba0280ed;hb=15efeb59d58720e4884f6b6ef374e1e22d2f4417;hpb=0c3bf9aaef7eff8c29473078889170b68657cb8c;ds=sidebyside 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);