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.
This commit is contained in:
Anthony J. Thibault 2016-03-09 14:28:26 -08:00
parent efdef52081
commit 4af3766804

View file

@ -69,6 +69,7 @@
#include <AutoUpdater.h>
#include <AudioInjectorManager.h>
#include <CursorManager.h>
#include <DebugDraw.h>
#include <DeferredLightingEffect.h>
#include <display-plugins/DisplayPlugin.h>
#include <EntityScriptingInterface.h>
@ -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");
}