Bug 1631113 - Do not check the position cap to assign local floor height r=kip,daoshengmu

Differential Revision: https://phabricator.services.mozilla.com/D71409
This commit is contained in:
Imanol Fernandez 2020-04-17 22:16:10 +00:00
parent c1ee1b488f
commit 355194cd42

View File

@ -30,13 +30,11 @@ gfx::PointDouble3D XRNativeOriginLocalFloor::GetPosition() {
if (!mInitialPositionValid || standing != mStandingTransform) {
const gfx::VRHMDSensorState& sensorState = mDisplay->GetSensorState();
gfx::PointDouble3D origin;
if (sensorState.flags & VRDisplayCapabilityFlags::Cap_Position) {
mInitialPosition.x = sensorState.pose.position[0];
mInitialPosition.y = -mFloorRandom - standing._42;
mInitialPosition.z = sensorState.pose.position[2];
mInitialPositionValid = true;
mStandingTransform = standing;
}
mInitialPosition.x = sensorState.pose.position[0];
mInitialPosition.y = -mFloorRandom - standing._42;
mInitialPosition.z = sensorState.pose.position[2];
mInitialPositionValid = true;
mStandingTransform = standing;
}
return mInitialPosition;
}