diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-17 12:54:34 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-18 05:10:11 +0200 |
commit | 12119e9fa2566624ed63305448cab9cf21017250 (patch) | |
tree | 13eed885c66be64be00d83b84ff3766b443e9be9 /tracker-steamvr/steamvr.cpp | |
parent | 4f29f56b4e0bf5f76e689868ca091a2af94590fe (diff) |
tracker/steamvr: fall back to old yaw formula
User reports max 90 yaw.
Diffstat (limited to 'tracker-steamvr/steamvr.cpp')
-rw-r--r-- | tracker-steamvr/steamvr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tracker-steamvr/steamvr.cpp b/tracker-steamvr/steamvr.cpp index 8585574a..3f0cd1d4 100644 --- a/tracker-steamvr/steamvr.cpp +++ b/tracker-steamvr/steamvr.cpp @@ -285,7 +285,7 @@ void steamvr::matrix_to_euler(double& yaw, double& pitch, double& roll, const vr using d = double; - yaw = atan2(d(-result.m[2][0]), sqrt(d(result.m[2][1]) * d(result.m[2][1]) + d(result.m[2][2]) * d(result.m[2][2]))); + yaw = atan2(d(result.m[2][0]), d(result.m[0][0])); pitch = atan2(d(result.m[2][1]), d(result.m[2][2])); roll = atan2(d(result.m[1][0]), d(result.m[0][0])); |