From: Ash Tyndall Date: Sat, 22 Oct 2011 02:55:32 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=aab2e2f70552398a51a24f644147a1c6de45c766;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index 5efecaf..25cc0dc 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(rotate*rotateFactor); - sceneObjs[curObject].z += (x - startx) * cos(rotate*rotateFactor); + sceneObjs[curObject].x += (x - startx) * cos(rotate*rotateFactor); + sceneObjs[curObject].z += (x - startx) * sin(rotate*rotateFactor); } else if ( buttonSelected == GLUT_MIDDLE_BUTTON ) { // w: big/small float diff = (x - startx);