summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Lange <klange@ogunderground.com>2008-02-02 21:46:58 -0500
committerKevin Lange <klange@ogunderground.com>2008-02-02 21:46:58 -0500
commit38b8b19ff439a73ca1c884580698af1a605bab8f (patch)
treebc6b72246dc8125f077968cc6c56652d74025306
parent73f9af30ab61957f764a4546b5811d1eb50cc532 (diff)
downloadwiitrack-38b8b19ff439a73ca1c884580698af1a605bab8f.tar.gz
wiitrack-38b8b19ff439a73ca1c884580698af1a605bab8f.tar.bz2
That wasn't needed...
-rw-r--r--wiitrack.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wiitrack.c b/wiitrack.c
index 4c40427..48f2ab3 100644
--- a/wiitrack.c
+++ b/wiitrack.c
@@ -273,13 +273,13 @@ static void WTLeeTrackPosition (CompScreen *s, float x1, float y1,
float pointDist = (float)sqrt(dx * dx + dy * dy);
float angle = radPerPix * pointDist / 2.0;
// Set the head distance in units of screen size
- wts->head.z = -((float)wiitrackGetBarWidth (s) / 10.0) / (float)tan(angle);
+ 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