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/main.cpp (1 of 2 files). Show all

Unified · Split

interface/src/main.cpp+7−0
@@ -425,6 +425,13 @@ void updateAvatar(float deltaTime) { · 424 unmodified lines
425425 myAvatar.setRenderPitch(myAvatar.getRenderPitch() * (1.f - RENDER_PITCH_DECAY * deltaTime));
426426 }
427427
428+ if (OculusManager::isConnected()) {
429+ float yaw, pitch, roll;
430+ OculusManager::getEulerAngles(yaw, pitch, roll);
431+ myAvatar.setBodyYaw(yaw);
432+ myAvatar.setRenderPitch(pitch);
433+ }
434+
428435 // Get audio loudness data from audio input device
429436 #ifndef _WIN32
430437 myAvatar.setLoudness(audio.getInputLoudness());