diff --git a/interface/src/Camera.cpp b/interface/src/Camera.cpp index 2d65337ea7..5316fdc739 100644 --- a/interface/src/Camera.cpp +++ b/interface/src/Camera.cpp @@ -7,6 +7,7 @@ #include #include +#include // #include "Log.h" #include "Camera.h" @@ -69,8 +70,14 @@ void Camera::updateFollowMode(float deltaTime) { t = 1.0; } - // update _yaw (before position!) - _yaw += (_idealYaw - _yaw) * t; + // update _yaw (before position!) + if (OculusManager::isConnected()) { + // if using the oculus, just set the yaw + _yaw = _idealYaw; + } else { + _yaw += (_idealYaw - _yaw) * t; + } + _orientation.yaw(_yaw); float radian = (_yaw / 180.0) * PIE; diff --git a/interface/src/main.cpp b/interface/src/main.cpp index 5260f3471e..5485f68727 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -425,6 +425,13 @@ void updateAvatar(float deltaTime) { myAvatar.setRenderPitch(myAvatar.getRenderPitch() * (1.f - RENDER_PITCH_DECAY * deltaTime)); } + if (OculusManager::isConnected()) { + float yaw, pitch, roll; + OculusManager::getEulerAngles(yaw, pitch, roll); + myAvatar.setBodyYaw(yaw); + myAvatar.setRenderPitch(pitch); + } + // Get audio loudness data from audio input device #ifndef _WIN32 myAvatar.setLoudness(audio.getInputLoudness());