From: Ash Tyndall Date: Sat, 22 Oct 2011 02:24:53 +0000 (+0800) Subject: (no commit message) X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=4bceef28c8187fdff231fe2bc03fd3da6b7adb4b;p=atyndall%2Fcits2231.git --- diff --git a/scene.c b/scene.c index b043279..74e79a7 100644 --- a/scene.c +++ b/scene.c @@ -307,15 +307,13 @@ void motion(int x, int y) { // w: big/small, h: up/down // For big/small scaling, we map negative numbers to 0->1 and positive numbers to 1->inf - float diff = (y - starty); + float diff = (x - startx); float scaling = ( diff + (float)height/2 ) / ( (float)height/2 ); sceneObjs[curObject].scale[0] *= scaling; sceneObjs[curObject].scale[1] *= scaling; sceneObjs[curObject].scale[2] *= scaling; printf("Diff is %f, Scaling by %f on all axii, 1/map is %f\n", diff, sceneObjs[curObject].scale[0], scaling); - - starty = y; } startx = x;