From 742543317c4b9e8fd77017e81bf67bffb97279b4 Mon Sep 17 00:00:00 2001 From: barnold1953 Date: Wed, 21 May 2014 09:12:28 -0700 Subject: [PATCH] Stopped magnifying FOV when wearing Oculus. --- interface/src/avatar/MyAvatar.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 7c051d8984..420362a415 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -264,11 +264,16 @@ void MyAvatar::updateFromTrackers(float deltaTime) { // their head only 30 degrees or so, this may correspond to a 90 degree field of view. // Note that roll is magnified by a constant because it is not related to field of view. - float magnifyFieldOfView = Menu::getInstance()->getFieldOfView() / Menu::getInstance()->getRealWorldFieldOfView(); - + Head* head = getHead(); - head->setDeltaPitch(estimatedRotation.x * magnifyFieldOfView); - head->setDeltaYaw(estimatedRotation.y * magnifyFieldOfView); + if (OculusManager::isConnected()){ + head->setDeltaPitch(estimatedRotation.x); + head->setDeltaYaw(estimatedRotation.y); + } else { + float magnifyFieldOfView = Menu::getInstance()->getFieldOfView() / Menu::getInstance()->getRealWorldFieldOfView(); + head->setDeltaPitch(estimatedRotation.x * magnifyFieldOfView); + head->setDeltaYaw(estimatedRotation.y * magnifyFieldOfView); + } head->setDeltaRoll(estimatedRotation.z); // the priovr can give us exact lean