From eb250ca62576f7682e79746140674cb76d87905a Mon Sep 17 00:00:00 2001 From: "Randall E. Barker" Date: Tue, 17 Mar 2020 12:59:43 -0700 Subject: [PATCH] Don't calculate reorientation matrix when recentering on G2 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 05343569d..204b7d7aa 100644 --- a/app/src/picovr/cpp/DeviceDelegatePicoVR.cpp +++ b/app/src/picovr/cpp/DeviceDelegatePicoVR.cpp @@ -292,9 +292,7 @@ DeviceDelegatePicoVR::GetReorientTransform() const { void DeviceDelegatePicoVR::SetReorientTransform(const vrb::Matrix& aMatrix) { - if (m.type == k6DofHeadSet) { - m.reorientMatrix = aMatrix; - } + m.reorientMatrix = aMatrix; } void @@ -368,7 +366,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); }