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 | #include <SharedUtil.h> | 8 | #include <SharedUtil.h> |
| 9 | #include <VoxelConstants.h> | 9 | #include <VoxelConstants.h> |
| 10 | #include <OculusManager.h> | ||
| 10 | // #include "Log.h" | 11 | // #include "Log.h" |
| 11 | 12 | ||
| 12 | #include "Camera.h" | 13 | #include "Camera.h" |
| @@ -69,8 +70,14 @@ void Camera::updateFollowMode(float deltaTime) { · 56 unmodified lines | |||
| 69 | t = 1.0; | 70 | t = 1.0; |
| 70 | } | 71 | } |
| 71 | 72 | ||
| 72 | // update _yaw (before position!) | 73 | // update _yaw (before position!) |
| 73 | _yaw += (_idealYaw - _yaw) * t; | 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 | _orientation.yaw(_yaw); | 81 | _orientation.yaw(_yaw); |
| 75 | 82 | ||
| 76 | float radian = (_yaw / 180.0) * PIE; | 83 | float radian = (_yaw / 180.0) * PIE; |