History

drive body yaw and render pitch with oculus when connected

Stephen Birarda committed 13 years ago

Commit 04447df1 parent adbca702 files · +16 −2Browse files

Showing the changes to interface/src/Camera.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Camera.cpp+9−2
@@ -7,6 +7,7 @@ · 6 unmodified lines
77
88 #include <SharedUtil.h>
99 #include <VoxelConstants.h>
10+#include <OculusManager.h>
1011 // #include "Log.h"
1112
1213 #include "Camera.h"
@@ -69,8 +70,14 @@ void Camera::updateFollowMode(float deltaTime) { · 56 unmodified lines
6970 t = 1.0;
7071 }
7172
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+
7481 _orientation.yaw(_yaw);
7582
7683 float radian = (_yaw / 180.0) * PIE;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t