From b8c5e24223988c84331693371bb9b0d71b7ef821 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 3 Oct 2014 21:12:41 +0200 Subject: fix toggle axis enablement properly --- facetracknoir/tracker.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'facetracknoir/tracker.cpp') diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp index 003324a7..17f1af5f 100644 --- a/facetracknoir/tracker.cpp +++ b/facetracknoir/tracker.cpp @@ -136,15 +136,13 @@ void Tracker::run() { T6DOF target_camera, target_camera2, new_camera; - if (enabled) - { + if (!enabled) + target_camera = raw_6dof; + else for (int i = 0; i < 6; i++) target_camera.axes[i] = mainApp->axis(i).headPos; - target_camera2 = target_camera - offset_camera; - } - else - target_camera2 = raw_6dof; + target_camera2 = target_camera - offset_camera; if (Libraries->pFilter) { Libraries->pFilter->FilterHeadPoseData(target_camera2.axes, new_camera.axes); -- cgit v1.2.3