History

Merge branch 'master' of https://github.com/highfidelity/hifi into domain-tunnel

Stephen Birarda committed 12 years ago

Commit 76d00f32 parents f637f5a 2a8b00224 files · +1219 −168Browse files

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

Unified · Split

interface/src/Application.cpp+5−2
@@ -600,10 +600,14 @@ void Application::paintGL() { · 599 unmodified lines
600600
601601 if (_myCamera.getMode() == CAMERA_MODE_FIRST_PERSON) {
602602 if (!OculusManager::isConnected()) {
603+ // If there isn't an HMD, match exactly to avatar's head
603604 _myCamera.setPosition(_myAvatar->getHead()->getEyePosition());
604605 _myCamera.setRotation(_myAvatar->getHead()->getCameraOrientation());
606+ } else {
607+ // For an HMD, set the base position and orientation to that of the avatar body
608+ _myCamera.setPosition(_myAvatar->getDefaultEyePosition());
609+ _myCamera.setRotation(_myAvatar->getWorldAlignedOrientation());
605610 }
606− // OculusManager::display() updates camera position and rotation a bit further on.
607611
608612 } else if (_myCamera.getMode() == CAMERA_MODE_THIRD_PERSON) {
609613 static const float THIRD_PERSON_CAMERA_DISTANCE = 1.5f;
@@ -659,7 +663,6 @@ void Application::paintGL() { · 49 unmodified lines
659663
660664 _viewFrustumOffsetCamera.setRotation(_myCamera.getRotation() * frustumRotation);
661665
662− _viewFrustumOffsetCamera.initialize(); // force immediate snap to ideal position and orientation
663666 _viewFrustumOffsetCamera.update(1.f/_fps);
664667 whichCamera = &_viewFrustumOffsetCamera;
665668 }

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