summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Lange <klange@ogunderground.com>2008-02-02 21:04:31 -0500
committerKevin Lange <klange@ogunderground.com>2008-02-02 21:04:31 -0500
commit73f9af30ab61957f764a4546b5811d1eb50cc532 (patch)
treef750c49f5420d0e986f444f63dddffc21d141105
parentaced1eef9902ddab3b14aed5f820cb49ca3ab31e (diff)
downloadwiitrack-73f9af30ab61957f764a4546b5811d1eb50cc532.tar.gz
wiitrack-73f9af30ab61957f764a4546b5811d1eb50cc532.tar.bz2
oops
-rw-r--r--wiitrack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wiitrack.c b/wiitrack.c
index 28d0f23..4c40427 100644
--- a/wiitrack.c
+++ b/wiitrack.c
@@ -276,10 +276,10 @@ static void WTLeeTrackPosition (CompScreen *s, float x1, float y1,
wts->head.z = -((float)wiitrackGetBarWidth (s) / 10.0) / (float)tan(angle);
float aX = (x1 + x2) / 2.0f, aY = (y1 + y2) / 2.0f;
// Set the head position horizontally
- wts->head.x = (float)sin(radPerPix * (aX - 512.0)) * wts->head.z;
+ wts->head.x = (float)sin(radPerPix * (aX - 512.0)) * -wts->head.z;
float relAng = (aY - 384.0) * radPerPix;
// Set the head height
- wts->head.y = -0.5f + (float)sin((float)wiitrackGetWiimoteVerticalAngle (s) / 100.0 + relAng) * wts->head.z;
+ wts->head.y = -0.5f + (float)sin((float)wiitrackGetWiimoteVerticalAngle (s) / 100.0 + relAng) * -wts->head.z;
// And adjust it to suit our needs
wts->head.y = wts->head.y + (float)wiitrackGetWiimoteAdjust (s) / 100.0;
// And if our Wiimote is above our screen, adjust appropriately