diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-27 07:41:26 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-02-27 07:41:26 +0100 |
commit | 38fad69a88d2dd985676477c02f768ce5b82e763 (patch) | |
tree | e7e1a5d52295aa26ae47e9614c448ffcc2252b7c /logic/tracker.cpp | |
parent | a714d9dea7ccb6d745a9859cf96a7f9ae7e97d7c (diff) |
logic/tracker: invert prior to applying camera skew
Diffstat (limited to 'logic/tracker.cpp')
-rw-r--r-- | logic/tracker.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/logic/tracker.cpp b/logic/tracker.cpp index 2c052f08..007189ec 100644 --- a/logic/tracker.cpp +++ b/logic/tracker.cpp @@ -226,15 +226,19 @@ void Tracker::logic() break; } - const euler_t rot = r2d * c_mult * rmat_to_euler(rotation); + euler_t rot = r2d * c_mult * rmat_to_euler(rotation); euler_t pos = euler_t(&value[TX]) - t_center; - // don't invert after t_compensate - // inverting here doesn't break centering + for (int i = 0; i < 3; i++) + { + // don't invert after t_compensate + // inverting here doesn't break centering - for (int i = 0; i < 6; i++) + if (m(i+3).opts.invert) + rot(i) = -rot(i); if (m(i).opts.invert) - value(i) = -value(i); + pos(i) = -pos(i); + } t_compensate(real_rotation.camera.t(), pos, pos, false, false, false); |