Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 399e570

Browse files
authored
Don't calculate reorientation matrix when recentering on G2 (#2973)
Fixes #2853
1 parent 15eae62 commit 399e570

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

app/src/picovr/cpp/DeviceDelegatePicoVR.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,7 @@ DeviceDelegatePicoVR::GetReorientTransform() const {
310310

311311
void
312312
DeviceDelegatePicoVR::SetReorientTransform(const vrb::Matrix& aMatrix) {
313-
if (m.type == k6DofHeadSet) {
314-
m.reorientMatrix = aMatrix;
315-
}
313+
m.reorientMatrix = aMatrix;
316314
}
317315

318316
void
@@ -393,7 +391,11 @@ DeviceDelegatePicoVR::StartFrame() {
393391

394392
if (m.renderMode == device::RenderMode::StandAlone) {
395393
if (m.recentered) {
396-
m.reorientMatrix = DeviceUtils::CalculateReorientationMatrix(head, kAverageHeight);
394+
if (m.type == k6DofHeadSet) {
395+
m.reorientMatrix = DeviceUtils::CalculateReorientationMatrix(head, kAverageHeight);
396+
} else {
397+
m.reorientMatrix = vrb::Matrix::Identity();
398+
}
397399
}
398400
head.TranslateInPlace(m.headOffset);
399401
}

0 commit comments

Comments
 (0)