mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 02:03:57 +02:00
another fix for viewing vive user in third person
This commit is contained in:
parent
86a51806a5
commit
94918be949
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue