From 51e24ea46661cf072793d6f31533b4cc2ad7ebde Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Fri, 10 Jul 2015 09:20:38 -0700 Subject: [PATCH] head model follows HMD for observers --- interface/src/avatar/MyAvatar.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 8ee378715b..086c658b0f 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -296,15 +296,18 @@ void MyAvatar::updateFromTrackers(float deltaTime) { Head* head = getHead(); if (inHmd || isPlaying()) { - head->setDeltaPitch(estimatedRotation.x); - head->setDeltaYaw(estimatedRotation.y); + if (!isRoomTracking) { + head->setDeltaPitch(estimatedRotation.x); + head->setDeltaYaw(estimatedRotation.y); + head->setDeltaRoll(estimatedRotation.z); + } } else { float magnifyFieldOfView = qApp->getFieldOfView() / _realWorldFieldOfView.get(); head->setDeltaPitch(estimatedRotation.x * magnifyFieldOfView); head->setDeltaYaw(estimatedRotation.y * magnifyFieldOfView); + head->setDeltaRoll(estimatedRotation.z); } - head->setDeltaRoll(estimatedRotation.z); // Update torso lean distance based on accelerometer data const float TORSO_LENGTH = 0.5f;