Skip to content

Commit

Permalink
Calculate standingMatrix using local floor relative pose transform (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro committed Apr 1, 2020
1 parent 007d7be commit 44406be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp
Expand Up @@ -901,6 +901,9 @@ DeviceDelegateOculusVR::StartFrame(const FramePrediction aPrediction) {
device::InlineSession | device::ImmersiveVRSession;
if (m.predictedTracking.Status & VRAPI_TRACKING_STATUS_POSITION_TRACKED) {
caps |= device::Position;
auto standing = vrapi_LocateTrackingSpace(m.ovr, VRAPI_TRACKING_SPACE_LOCAL_FLOOR);
vrb::Vector translation(-standing.Position.x, -standing.Position.y, -standing.Position.z);
m.immersiveDisplay->SetSittingToStandingTransform(vrb::Matrix::Translation(translation));
} else {
caps |= device::PositionEmulated;
}
Expand Down

0 comments on commit 44406be

Please sign in to comment.