diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/OculusVR.java b/jme3-vr/src/main/java/com/jme3/input/vr/OculusVR.java index 0dba2292b..75cf16f4d 100644 --- a/jme3-vr/src/main/java/com/jme3/input/vr/OculusVR.java +++ b/jme3-vr/src/main/java/com/jme3/input/vr/OculusVR.java @@ -210,6 +210,15 @@ public class OculusVR implements VRAPI { return true; } + @Override + public void updatePose() { + double ftiming = ovr_GetPredictedDisplayTime(session, 0); + OVRTrackingState hmdState = OVRTrackingState.malloc(); + ovr_GetTrackingState(session, ftiming, true, hmdState); + + // TODO + } + @Override public boolean isInitialized() { return initialized; @@ -251,11 +260,6 @@ public class OculusVR implements VRAPI { throw new UnsupportedOperationException(); } - @Override - public void updatePose() { - throw new UnsupportedOperationException(); - } - @Override public Matrix4f getHMDMatrixProjectionLeftEye(Camera cam) { return matrixO2J(projections[ovrEye_Left], new Matrix4f()); diff --git a/jme3-vr/src/main/java/com/jme3/util/VRViewManagerOculus.java b/jme3-vr/src/main/java/com/jme3/util/VRViewManagerOculus.java index 7c1fa5637..268d5a290 100644 --- a/jme3-vr/src/main/java/com/jme3/util/VRViewManagerOculus.java +++ b/jme3-vr/src/main/java/com/jme3/util/VRViewManagerOculus.java @@ -222,6 +222,8 @@ public class VRViewManagerOculus extends AbstractVRViewManager { @Override public void update(float tpf) { // TODO + + hardware.updatePose(); } @Override