diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 900d1bbb63..a2eb58def4 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4733,13 +4733,13 @@ void Application::renderRearViewMirror(RenderArgs* renderArgs, const QRect& regi renderArgs->_viewport = originalViewport; } -void Application::resetSensors(bool andReload) { +void Application::resetSensors(bool andRecenter) { DependencyManager::get()->reset(); DependencyManager::get()->reset(); DependencyManager::get()->reset(); getActiveDisplayPlugin()->resetSensors(); _overlayConductor.centerUI(); - getMyAvatar()->reset(andReload); + getMyAvatar()->reset(andRecenter); QMetaObject::invokeMethod(DependencyManager::get().data(), "reset", Qt::QueuedConnection); } diff --git a/interface/src/Application.h b/interface/src/Application.h index 5ab94465cc..a57fa1b02d 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -317,7 +317,7 @@ public slots: void openUrl(const QUrl& url) const; - void resetSensors(bool andReload = false); + void resetSensors(bool andRecenter = false); void setActiveFaceTracker() const; #if (PR_BUILD || DEV_BUILD) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 5b691a6dc6..4296907863 100755 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -254,6 +254,10 @@ void MyAvatar::centerBody() { return; } + if (!qApp->isHMDMode()) { + return; + } + // derive the desired body orientation from the current hmd orientation, before the sensor reset. auto newBodySensorMatrix = deriveBodyFromHMDSensor(); // Based on current cached HMD position/rotation.. @@ -308,7 +312,7 @@ void MyAvatar::reset(bool andRecenter, bool andReload, bool andHead) { } setThrust(glm::vec3(0.0f)); - if (andRecenter) { + if (andRecenter && qApp->isHMDMode()) { // derive the desired body orientation from the *old* hmd orientation, before the sensor reset. auto newBodySensorMatrix = deriveBodyFromHMDSensor(); // Based on current cached HMD position/rotation..