Add functions to use absolute tracking
[libs/vr.git] / source / openvr / openvrsystem.cpp
index ec6b418d0a455a9e5f4fb5d7273a6a6e54cc5f8b..e71ba33b45346935d22eb48fc54b22724f4f4888 100644 (file)
@@ -69,6 +69,11 @@ void OpenVRSystem::configure_view(StereoView &view) const
        view.set_eye_matrices(convert_matrix(left), convert_matrix(right));
 }
 
+void OpenVRSystem::set_absolute_tracking(bool a)
+{
+       vr::VRCompositor()->SetTrackingSpace(a ? vr::TrackingUniverseStanding : vr::TrackingUniverseSeated);
+}
+
 OpenVRCamera *OpenVRSystem::create_camera(const GL::Camera &bc)
 {
        return new OpenVRCamera(*this, bc);