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
425 myAvatar.setRenderPitch(myAvatar.getRenderPitch() * (1.f - RENDER_PITCH_DECAY * deltaTime));425 myAvatar.setRenderPitch(myAvatar.getRenderPitch() * (1.f - RENDER_PITCH_DECAY * deltaTime));
426 }426 }
427 427
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
428 // Get audio loudness data from audio input device435 // Get audio loudness data from audio input device
429 #ifndef _WIN32436 #ifndef _WIN32
430 myAvatar.setLoudness(audio.getInputLoudness());437 myAvatar.setLoudness(audio.getInputLoudness());