summaryrefslogtreecommitdiffhomepage
path: root/logic/tracker.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-12-09 12:45:29 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-12-09 12:54:55 +0100
commit5a5cf4bac9af84252b28e56b15b71708f8cd3b7b (patch)
tree19c4561fcf66ab32b2a629f74157f815c7b464d5 /logic/tracker.cpp
parentbad34742736f7d9ee781f77766629140a49d6f28 (diff)
gui, logic: allow toggle neck displacement
It was only possible to zero the values to turn it off.
Diffstat (limited to 'logic/tracker.cpp')
-rw-r--r--logic/tracker.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/logic/tracker.cpp b/logic/tracker.cpp
index 25e067a7..332828a9 100644
--- a/logic/tracker.cpp
+++ b/logic/tracker.cpp
@@ -281,15 +281,16 @@ void Tracker::logic()
euler_t neck, rel;
+ if (s.neck_enable)
{
double ny = s.neck_y, nz = -s.neck_z;
if (ny != 0 || nz != 0)
{
const rmat R = euler_to_rmat(
- euler_t(value(Yaw) * d2r,
- value(Pitch) * d2r,
- value(Roll) * d2r));
+ euler_t(value(Yaw) * d2r,
+ value(Pitch) * d2r,
+ value(Roll) * d2r));
euler_t xyz(0, ny, nz);
t_compensate(R, xyz, xyz, false, false, false);
neck(TX) = xyz(TX);