summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/tracker.cpp
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-09-16 11:00:34 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-09-16 11:00:34 +0000
commitf6b15f2481b99d6a48225bb920ccef0519f5025d (patch)
treed81fceee440e328e08605647854a1e152085bca5 /FaceTrackNoIR/tracker.cpp
parent7fd2f6d1af0624953aa0a9639373e9bb225c054a (diff)
Initialize newpose before getting data from the Tracker.
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@141 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/tracker.cpp')
-rw-r--r--FaceTrackNoIR/tracker.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index b9497fde..3a7eb4f9 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -95,7 +95,7 @@ T6DOF Tracker::target_camera(0,0,0,0,0,0);
T6DOF Tracker::new_camera(0,0,0,0,0,0);
T6DOF Tracker::output_camera(0,0,0,0,0,0); // Position sent to game protocol
-THeadPoseDOF Tracker::Pitch("PitchUp", "PitchDown", 50, 90); // One structure for each of 6DOF's
+THeadPoseDOF Tracker::Pitch("PitchUp", "PitchDown", 50, 180); // One structure for each of 6DOF's
THeadPoseDOF Tracker::Yaw("Yaw", "", 50, 180);
THeadPoseDOF Tracker::Roll("Roll", "", 50, 180);
THeadPoseDOF Tracker::X("X","", 50, 180);
@@ -463,6 +463,13 @@ T6DOF gameoutput_camera(0,0,0,0,0,0);
if (WaitForSingleObject(Tracker::hTrackMutex, 100) == WAIT_OBJECT_0) {
THeadPoseData newpose;
+ newpose.pitch = 0.0f;
+ newpose.roll = 0.0f;
+ newpose.yaw = 0.0f;
+ newpose.x = 0.0f;
+ newpose.y = 0.0f;
+ newpose.z = 0.0f;
+
Tracker::confid = pTracker->GiveHeadPoseData(&newpose);
if ( Tracker::confid ) {
addHeadPose(newpose);