fix bug that causes hmd avatar eyes to be all the way to the side when there's not another avatar to look at

This commit is contained in:
Seth Alves 2017-06-08 13:55:30 -07:00
parent 3b47142592
commit ce4c3e1601

View file

@ -4160,7 +4160,7 @@ void Application::updateMyAvatarLookAtPosition() {
if (isHMD) {
glm::mat4 worldHeadMat = myAvatar->getSensorToWorldMatrix() *
myAvatar->getHeadControllerPoseInSensorFrame().getMatrix();
lookAtSpot = transformPoint(worldHeadMat, glm::vec3(0.0f, 0.0f, -TREE_SCALE));
lookAtSpot = transformPoint(worldHeadMat, glm::vec3(0.0f, 0.0f, TREE_SCALE));
} else {
lookAtSpot = myAvatar->getHead()->getEyePosition() +
(myAvatar->getHead()->getFinalOrientationInWorldFrame() * glm::vec3(0.0f, 0.0f, TREE_SCALE));