From: Ash Tyndall Date: Sat, 22 Oct 2011 02:56:24 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=commitdiff_plain;h=974b0d95620640e8589a286f16f746b3b7887b52;hp=aab2e2f70552398a51a24f644147a1c6de45c766 --- diff --git a/scene.c b/scene.c index 25cc0dc..c6f3d2c 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) * cos(rotate*rotateFactor); - sceneObjs[curObject].z += (x - startx) * sin(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);