undo playspace fix aswell and adjust log messages.
This commit is contained in:
@@ -102,7 +102,7 @@ void FixFloorTabController::eventLoopTick(vr::TrackedDevicePose_t* devicePoses)
|
|||||||
} else {
|
} else {
|
||||||
floorOffsetY = tempOffsetY - controllerDownOffsetCorrection;
|
floorOffsetY = tempOffsetY - controllerDownOffsetCorrection;
|
||||||
}
|
}
|
||||||
LOG(INFO) << "Fix Floor: Floor Offset = [" << floorOffsetX << ", " << floorOffsetY << ", " << floorOffsetZ << "]";
|
LOG(INFO) << "Fix Floor and adjust playspace center: Floor Offset = [" << floorOffsetX << ", " << floorOffsetY << ", " << floorOffsetZ << "]";
|
||||||
parent->AddOffsetToUniverseCenter(vr::TrackingUniverseStanding, 0, floorOffsetX, false);
|
parent->AddOffsetToUniverseCenter(vr::TrackingUniverseStanding, 0, floorOffsetX, false);
|
||||||
parent->AddOffsetToUniverseCenter(vr::TrackingUniverseStanding, 1, floorOffsetY, false);
|
parent->AddOffsetToUniverseCenter(vr::TrackingUniverseStanding, 1, floorOffsetY, false);
|
||||||
parent->AddOffsetToUniverseCenter(vr::TrackingUniverseStanding, 2, floorOffsetZ, false);
|
parent->AddOffsetToUniverseCenter(vr::TrackingUniverseStanding, 2, floorOffsetZ, false);
|
||||||
@@ -148,8 +148,10 @@ void FixFloorTabController::fixFloorClicked() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FixFloorTabController::undoFixFloorClicked() {
|
void FixFloorTabController::undoFixFloorClicked() {
|
||||||
|
parent->AddOffsetToUniverseCenter(vr::TrackingUniverseStanding, 0, -floorOffsetX, false);
|
||||||
parent->AddOffsetToUniverseCenter(vr::TrackingUniverseStanding, 1, -floorOffsetY, false);
|
parent->AddOffsetToUniverseCenter(vr::TrackingUniverseStanding, 1, -floorOffsetY, false);
|
||||||
LOG(INFO) << "Fix Floor: Undo Floor Offset = " << -floorOffsetY;
|
parent->AddOffsetToUniverseCenter(vr::TrackingUniverseStanding, 2, -floorOffsetZ, false);
|
||||||
|
LOG(INFO) << "Fix Floor: Undo Floor Offset = [" << -floorOffsetX << ", " << -floorOffsetY << ", " << -floorOffsetZ << "]";
|
||||||
floorOffsetY = 0.0f;
|
floorOffsetY = 0.0f;
|
||||||
statusMessage = "Undo ... OK";
|
statusMessage = "Undo ... OK";
|
||||||
statusMessageTimeout = 1.0;
|
statusMessageTimeout = 1.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user