From 4bceef28c8187fdff231fe2bc03fd3da6b7adb4b Mon Sep 17 00:00:00 2001 From: Ash Tyndall Date: Sat, 22 Oct 2011 10:24:53 +0800 Subject: [PATCH] --- scene.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; -- 2.20.1