Showing the changes to interface/src/Camera.cpp (1 of 2 files). Show all
Unified · Split
| @@ -7,6 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | |
| 8 | 8 | #include <SharedUtil.h> |
| 9 | 9 | #include <VoxelConstants.h> |
| 10 | +#include <OculusManager.h> | |
| 10 | 11 | // #include "Log.h" |
| 11 | 12 | |
| 12 | 13 | #include "Camera.h" |
| @@ -69,8 +70,14 @@ void Camera::updateFollowMode(float deltaTime) { · 56 unmodified lines | ||
| 69 | 70 | t = 1.0; |
| 70 | 71 | } |
| 71 | 72 | |
| 72 | − // update _yaw (before position!) | |
| 73 | − _yaw += (_idealYaw - _yaw) * t; | |
| 73 | + // update _yaw (before position!) | |
| 74 | + if (OculusManager::isConnected()) { | |
| 75 | + // if using the oculus, just set the yaw | |
| 76 | + _yaw = _idealYaw; | |
| 77 | + } else { | |
| 78 | + _yaw += (_idealYaw - _yaw) * t; | |
| 79 | + } | |
| 80 | + | |
| 74 | 81 | _orientation.yaw(_yaw); |
| 75 | 82 | |
| 76 | 83 | float radian = (_yaw / 180.0) * PIE; |