X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=scene.c;h=d9a4ea3be32f39ed4ab99b5a8cb52c6971cabe3c;hp=a529c62e19f25359fbe2a4b95800aeb5434c619d;hb=ddf25313dfc93155b958b2838b6dba330e2706d9;hpb=ea48dd7a038f3648d49808c3f9444ad6f636ba93 diff --git a/scene.c b/scene.c index a529c62..d9a4ea3 100644 --- a/scene.c +++ b/scene.c @@ -256,8 +256,8 @@ void keyboard(unsigned char key, int x, int y) { */ void motion(int x, int y) { if (moving) { - zoomFactor += (x - startx); - rotateFactor += (y - starty); + zoomFactor += (y - starty); + rotateFactor += (x - startx); startx = x; starty = y; glutPostRedisplay(); @@ -319,7 +319,7 @@ void display() { glPushMatrix(); /* Perform scene rotations based on user mouse/keyboard input. */ - glRotatef(rotateFactor*0.2, 0.0, 1.0, 0.0); + glRotatef(rotateFactor*0.5, 0.0, 1.0, 0.0); //glTranslatef(camx, camy, camz); //glRotatef(rot, 1.0, 0.0, 0.0);