Skip to content

Commit

Permalink
Don't calculate reorientation matrix when recentering on G2 (#2973)
Browse files Browse the repository at this point in the history
Fixes #2853
  • Loading branch information
bluemarvin committed Mar 18, 2020
1 parent 15eae62 commit 399e570
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/src/picovr/cpp/DeviceDelegatePicoVR.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 399e570

Please sign in to comment.