History

More tweaks to eye offsets.

Andrzej Kapolka committed 13 years ago

Commit a7683fa1 parent e4bf5353 files · +16 −3Browse files

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

Unified · Split

interface/src/Application.cpp+4−1
@@ -1958,8 +1958,11 @@ void Application::update(float deltaTime) { · 1957 unmodified lines
19581958 }
19591959 if (_faceshift.isActive()) {
19601960 glm::vec3 origin = _myAvatar.getHead().calculateAverageEyePosition();
1961+ float pitchSign = (_myCamera.getMode() == CAMERA_MODE_MIRROR) ? -1.0f : 1.0f;
1962+ const float PITCH_SCALE = 0.25f;
1963+ const float YAW_SCALE = 0.25f;
19611964 lookAtSpot = origin + _myCamera.getRotation() * _faceshift.getHeadRotation() * glm::quat(glm::radians(glm::vec3(
1962− _faceshift.getEstimatedEyePitch(), _faceshift.getEstimatedEyeYaw(), 0.0f))) *
1965+ _faceshift.getEstimatedEyePitch() * pitchSign * PITCH_SCALE, _faceshift.getEstimatedEyeYaw() * YAW_SCALE, 0.0f))) *
19631966 glm::inverse(_myCamera.getRotation()) * (lookAtSpot - origin);
19641967 }
19651968 _myAvatar.getHead().setLookAtPosition(lookAtSpot);

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