From 4af37668047ab36ae95ff2f563293e7e97a8719a Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Wed, 9 Mar 2016 14:28:26 -0800 Subject: [PATCH] Don't reset sensors when initializing or changing display plugins. This should fix the issue with the Oculus starting up with the UI aligned to the HMD on your desk, rather then the configured default sitting pose. --- interface/src/Application.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 660e597752..654e58c170 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -69,6 +69,7 @@ #include #include #include +#include #include #include #include @@ -3287,6 +3288,14 @@ void Application::update(float deltaTime) { // update sensorToWorldMatrix for rendering camera. myAvatar->updateSensorToWorldMatrix(); + + // AJT: TODO: make this a menu item. + const bool DRAW_SENSOR_TO_WORLD_MATRIX = true; + if (DRAW_SENSOR_TO_WORLD_MATRIX) { + // draw the origin of the room in world space. + glm::mat4 m = myAvatar->getSensorToWorldMatrix(); + DebugDraw::getInstance().addMarker("room", glmExtractRotation(m), extractTranslation(m), glm::vec4(1)); + } } @@ -4811,7 +4820,7 @@ void Application::updateDisplayMode() { } } emit activeDisplayPluginChanged(); - resetSensors(); + Q_ASSERT_X(_displayPlugin, "Application::updateDisplayMode", "could not find an activated display plugin"); }