History

change some code to look at head-controller position rather than hmd position

Seth Alves committed 9 years ago

Commit bdbc6dd1 parent 499897e6 files · +39 −39Browse files

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

Unified · Split

interface/src/Application.cpp+3−1
@@ -3953,6 +3953,7 @@ void Application::updateMyAvatarLookAtPosition() { · 3952 unmodified lines
39533953 lookAtPosition.x = -lookAtPosition.x;
39543954 }
39553955 if (isHMD) {
3956+ // TODO -- this code is probably wrong, getHeadPose() returns something in sensor frame, not avatar
39563957 glm::mat4 headPose = getActiveDisplayPlugin()->getHeadPose();
39573958 glm::quat hmdRotation = glm::quat_cast(headPose);
39583959 lookAtSpot = _myCamera.getPosition() + myAvatar->getOrientation() * (hmdRotation * lookAtPosition);
@@ -3995,7 +3996,8 @@ void Application::updateMyAvatarLookAtPosition() { · 36 unmodified lines
39953996 } else {
39963997 // I am not looking at anyone else, so just look forward
39973998 if (isHMD) {
3998− glm::mat4 worldHMDMat = myAvatar->getSensorToWorldMatrix() * myAvatar->getHMDSensorMatrix();
3999+ glm::mat4 worldHMDMat = myAvatar->getSensorToWorldMatrix() *
4000+ (glm::mat4)myAvatar->getHeadControllerPoseInSensorFrame();
39994001 lookAtSpot = transformPoint(worldHMDMat, glm::vec3(0.0f, 0.0f, -TREE_SCALE));
40004002 } else {
40014003 lookAtSpot = myAvatar->getHead()->getEyePosition() +

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