X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=5efecaf43bece5c93b0d57ad47c709514d399c31;hp=997d8b0798496365a5ab64a00cb8dd932e62e29a;hb=ccafea19dd13dcd3ef20b521cd629096df97660c;hpb=15efeb59d58720e4884f6b6ef374e1e22d2f4417;ds=inline diff --git a/scene.c b/scene.c index 997d8b0..5efecaf 100644 --- a/scene.c +++ b/scene.c @@ -309,8 +309,8 @@ void motion(int x, int y) { //so.x, so.y, so.z //sceneObjs[curObject].x += (x - startx)*leftrightFactor; 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); + sceneObjs[curObject].x += (x - startx) * sin(rotate*rotateFactor); + sceneObjs[curObject].z += (x - startx) * cos(rotate*rotateFactor); } else if ( buttonSelected == GLUT_MIDDLE_BUTTON ) { // w: big/small float diff = (x - startx);