History

When in mirror mode and using a blend face, try to position the camera so as to look directly into the face's eyes.

Andrzej Kapolka committed 13 years ago

Commit 87bdd2f1 parent 3cca3dc5 files · +30 −15Browse files

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

Unified · Split

interface/src/Application.cpp+9−1
@@ -332,7 +332,15 @@ void Application::paintGL() { · 331 unmodified lines
332 332
333 if (_myCamera.getMode() == CAMERA_MODE_MIRROR) {333 if (_myCamera.getMode() == CAMERA_MODE_MIRROR) {
334 _myCamera.setTightness (100.0f); 334 _myCamera.setTightness (100.0f);
335 _myCamera.setTargetPosition(_myAvatar.getUprightHeadPosition());335 glm::vec3 targetPosition = _myAvatar.getUprightHeadPosition();
336 if (_myAvatar.getHead().getBlendFace().isActive()) {
337 // make sure we're aligned to the blend face eyes
338 glm::vec3 leftEyePosition, rightEyePosition;
339 if (_myAvatar.getHead().getBlendFace().getEyePositions(leftEyePosition, rightEyePosition, true)) {
340 targetPosition = (leftEyePosition + rightEyePosition) * 0.5f;
341 }
342 }
343 _myCamera.setTargetPosition(targetPosition);
336 _myCamera.setTargetRotation(_myAvatar.getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PIf, 0.0f)));344 _myCamera.setTargetRotation(_myAvatar.getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PIf, 0.0f)));
337 345
338 } else if (OculusManager::isConnected()) {346 } else if (OculusManager::isConnected()) {

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