From 399e57063cc667e01bd52a57e481a93f54e55387 Mon Sep 17 00:00:00 2001 From: "Randall E. Barker" Date: Wed, 18 Mar 2020 11:16:26 -0700 Subject: [PATCH] Don't calculate reorientation matrix when recentering on G2 (#2973) Fixes #2853 --- app/src/picovr/cpp/DeviceDelegatePicoVR.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/picovr/cpp/DeviceDelegatePicoVR.cpp b/app/src/picovr/cpp/DeviceDelegatePicoVR.cpp index 68cd7a336..616bdc855 100644 --- a/app/src/picovr/cpp/DeviceDelegatePicoVR.cpp +++ b/app/src/picovr/cpp/DeviceDelegatePicoVR.cpp @@ -310,9 +310,7 @@ DeviceDelegatePicoVR::GetReorientTransform() const { void DeviceDelegatePicoVR::SetReorientTransform(const vrb::Matrix& aMatrix) { - if (m.type == k6DofHeadSet) { - m.reorientMatrix = aMatrix; - } + m.reorientMatrix = aMatrix; } void @@ -393,7 +391,11 @@ DeviceDelegatePicoVR::StartFrame() { if (m.renderMode == device::RenderMode::StandAlone) { if (m.recentered) { - m.reorientMatrix = DeviceUtils::CalculateReorientationMatrix(head, kAverageHeight); + if (m.type == k6DofHeadSet) { + m.reorientMatrix = DeviceUtils::CalculateReorientationMatrix(head, kAverageHeight); + } else { + m.reorientMatrix = vrb::Matrix::Identity(); + } } head.TranslateInPlace(m.headOffset); }