Permalink
Browse files

Sensor fusion: Add support for image mirroring

  • Loading branch information...
1 parent 58cf465 commit 5b714cbaecbdba5f7ca3cc1f1fab62b37f291403 @thp committed Oct 14, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/tracker/psmove_fusion.cpp
@@ -90,6 +90,11 @@ psmove_fusion_get_modelview_matrix(PSMoveFusion *fusion, PSMove *move)
float q0, q1, q2, q3;
psmove_get_orientation(move, &q0, &q1, &q2, &q3);
+ if (psmove_tracker_get_mirror(fusion->tracker)) {
+ /* Need to invert these two axes if mirroring is enabled */
+ q3 *= -1.;
+ q2 *= -1.;
+ }
glm::quat quaternion(q3, q2, q1, q0);
float x, y, z;

0 comments on commit 5b714cb

Please sign in to comment.