summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-03 11:43:10 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-03 12:00:01 +0200
commit29c42b31fc1dc90978706ee42a1723991287abd0 (patch)
treeed4146ff17522ef760313f794403bfdd60082cd9
parente30583e65948eb7b638f6311e0325f9fa5e71572 (diff)
logic/tracker: move invert after mapping
It's only for when games expect different sign. If tracker input translation is necessary, use either "camera offset" for rotation between -180 to 180 roll value, or given tracker's option. For trackers where this is necessary they should offer an option in their own dialog.
-rw-r--r--logic/tracker.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/logic/tracker.cpp b/logic/tracker.cpp
index 4072d932..c5db5239 100644
--- a/logic/tracker.cpp
+++ b/logic/tracker.cpp
@@ -264,9 +264,6 @@ void Tracker::logic()
for (int i = 0; i < 6; i++)
value(i) += m(i).opts.zero;
- for (int i = 0; i < 6; i++)
- value(i) *= int(m(i).opts.invert) * -2 + 1;
-
if (zero_)
for (int i = 0; i < 6; i++)
value(i) = 0;
@@ -292,6 +289,9 @@ void Tracker::logic()
for (int i = 0; i < 3; i++)
value(i) = map(value(i), m(i));
+ for (int i = 0; i < 6; i++)
+ value(i) *= int(m(i).opts.invert) * -2 + 1;
+
logger.write_pose(value); // "mapped"
if (nanp)