another fix for viewing vive user in third person

This commit is contained in:
Anthony J. Thibault 2015-07-10 12:28:34 -07:00
parent 86a51806a5
commit 94918be949
2 changed files with 4 additions and 3 deletions

View file

@ -3743,7 +3743,7 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se
}
renderArgs->_debugFlags = renderDebugFlags;
_entities.render(renderArgs);
ViveControllerManager::getInstance().render(renderArgs);
//ViveControllerManager::getInstance().render(renderArgs);
}
// render the ambient occlusion effect if enabled

View file

@ -1313,9 +1313,10 @@ void MyAvatar::updateOrientation(float deltaTime) {
if (qApp->isHMDMode()) {
// these angles will be in radians
glm::quat orientation = qApp->getHeadOrientation();
glm::quat orientation = glm::quat_cast(_sensorToWorldMat) * qApp->getHeadOrientation();
glm::quat localOrientation = glm::inverse(bodyOrientation) * orientation;
// ... so they need to be converted to degrees before we do math...
glm::vec3 euler = glm::eulerAngles(orientation) * DEGREES_PER_RADIAN;
glm::vec3 euler = glm::eulerAngles(localOrientation) * DEGREES_PER_RADIAN;
//Invert yaw and roll when in mirror mode
if (Application::getInstance()->getCamera()->getMode() == CAMERA_MODE_MIRROR) {