Merge pull request #757 from neph1/osvr_viewmanager

reverting orientation changes.
empirephoenix-patch-1
Rickard Edén 7 years ago committed by GitHub
commit 29726ccb88
  1. 8
      jme3-vr/src/main/java/com/jme3/input/vr/OSVR.java

@ -331,9 +331,9 @@ public class OSVR implements VRAPI {
@Override
public Quaternion getOrientation() {
storeRot.set((float)hmdPose.rotation.data[1],
storeRot.set((float)-hmdPose.rotation.data[1],
(float)hmdPose.rotation.data[2],
(float)hmdPose.rotation.data[3],
(float)-hmdPose.rotation.data[3],
(float)hmdPose.rotation.data[0]);
if( storeRot.equals(Quaternion.ZERO) ) storeRot.set(Quaternion.DIRECTION_Z);
return storeRot;
@ -352,9 +352,9 @@ public class OSVR implements VRAPI {
storePos.x = (float)-hmdPose.translation.data[0];
storePos.y = (float)hmdPose.translation.data[1];
storePos.z = (float)-hmdPose.translation.data[2];
storeRot.set((float)hmdPose.rotation.data[1],
storeRot.set((float)-hmdPose.rotation.data[1],
(float)hmdPose.rotation.data[2],
(float)hmdPose.rotation.data[3],
(float)-hmdPose.rotation.data[3],
(float)hmdPose.rotation.data[0]);
if( storeRot.equals(Quaternion.ZERO) ) storeRot.set(Quaternion.DIRECTION_Z);
}

Loading…
Cancel
Save