(no commit message)
authorAsh Tyndall <[email protected]>
Sat, 22 Oct 2011 02:56:24 +0000 (10:56 +0800)
committerAsh Tyndall <[email protected]>
Sat, 22 Oct 2011 02:56:24 +0000 (10:56 +0800)
scene.c

diff --git a/scene.c b/scene.c
index 25cc0dc..c6f3d2c 100644 (file)
--- a/scene.c
+++ b/scene.c
@@ -309,8 +309,8 @@ void motion(int x, int y) {
          //so.x, so.y, so.z\r
         //sceneObjs[curObject].x += (x - startx)*leftrightFactor;\r
         printf("cam angle: %f\n", rotate*rotateFactor);\r
-        sceneObjs[curObject].x += (x - startx) * cos(rotate*rotateFactor);\r
-        sceneObjs[curObject].z += (x - startx) * sin(rotate*rotateFactor);\r
+        sceneObjs[curObject].x = (x - startx) * sin(rotate*rotateFactor);\r
+        sceneObjs[curObject].z = (x - startx) * cos(rotate*rotateFactor);\r
       } else if ( buttonSelected == GLUT_MIDDLE_BUTTON ) {\r
         // w: big/small\r
         float diff = (x - startx);\r

UCC git Repository :: git.ucc.asn.au