From 0a76a2f7d38931cac4e8106b08a26126cb4aa655 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 5 Jun 2022 14:56:28 +0200 Subject: tracker/steamvr: use internal centering with no VRChaperone --- tracker-steamvr/steamvr.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tracker-steamvr') diff --git a/tracker-steamvr/steamvr.cpp b/tracker-steamvr/steamvr.cpp index d3aaff77..15795c0c 100644 --- a/tracker-steamvr/steamvr.cpp +++ b/tracker-steamvr/steamvr.cpp @@ -263,13 +263,17 @@ bool steamvr::center() { auto* c = vr::VRChaperone(); if (!c) + { eval_once(qDebug() << "vr::VRChaperone == NULL"); + return false; + } else + { c->ResetZeroPose(origin::TrackingUniverseSeated); - - // Use chaperone universe real world up instead of opentrack's initial pose centering - // Note: Controllers will be centered based on initial headset position. - return true; + // Use chaperone universe real world up instead of opentrack's initial pose centering + // Note: Controllers will be centered based on initial headset position. + return true; + } } else // with controllers, resetting the seated pose does nothing -- cgit v1.2.3