Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 44406be

Browse files
authored
Calculate standingMatrix using local floor relative pose transform (#3078)
1 parent 007d7be commit 44406be

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,9 @@ DeviceDelegateOculusVR::StartFrame(const FramePrediction aPrediction) {
901901
device::InlineSession | device::ImmersiveVRSession;
902902
if (m.predictedTracking.Status & VRAPI_TRACKING_STATUS_POSITION_TRACKED) {
903903
caps |= device::Position;
904+
auto standing = vrapi_LocateTrackingSpace(m.ovr, VRAPI_TRACKING_SPACE_LOCAL_FLOOR);
905+
vrb::Vector translation(-standing.Position.x, -standing.Position.y, -standing.Position.z);
906+
m.immersiveDisplay->SetSittingToStandingTransform(vrb::Matrix::Translation(translation));
904907
} else {
905908
caps |= device::PositionEmulated;
906909
}

0 commit comments

Comments
 (0)