Showing the changes to interface/src/scripting/HMDScriptingInterface.cpp (1 of 6 files). Show all
Unified · Split
| @@ -118,7 +118,7 @@ bool HMDScriptingInterface::getHUDLookAtPosition3D(glm::vec3& result) const { · 117 unmodified lines | |||
| 118 | 118 | ||
| 119 | glm::mat4 HMDScriptingInterface::getWorldHMDMatrix() const { | 119 | glm::mat4 HMDScriptingInterface::getWorldHMDMatrix() const { |
| 120 | auto myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar(); | 120 | auto myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar(); |
| 121 | return myAvatar->getSensorToWorldMatrix() * myAvatar->getHMDSensorMatrix(); | 121 | return myAvatar->getSensorToWorldMatrix() * (glm::mat4)myAvatar->getHeadControllerPoseInSensorFrame(); |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | glm::vec3 HMDScriptingInterface::getPosition() const { | 124 | glm::vec3 HMDScriptingInterface::getPosition() const { |