diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-03 21:12:41 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-03 21:12:41 +0200 |
commit | b8c5e24223988c84331693371bb9b0d71b7ef821 (patch) | |
tree | a8503a16f9cc3a3948fb3d2d73aed75af93b1361 | |
parent | 3f18a2e9bf16ea1f9eb681d42aefe0d1270612a8 (diff) |
fix toggle axis enablement properly
-rw-r--r-- | facetracknoir/tracker.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
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); |