It now returns a smart_ptr, not a raw pointer.
Showing the changes to interface/src/scripting/HMDScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -95,7 +95,7 @@ void HMDScriptingInterface::setPosition(const glm::vec3& position) { · 94 unmodified lines | |||
| 95 | QMetaObject::invokeMethod(this, "setPosition", Qt::QueuedConnection, Q_ARG(const glm::vec3&, position)); | 95 | QMetaObject::invokeMethod(this, "setPosition", Qt::QueuedConnection, Q_ARG(const glm::vec3&, position)); |
| 96 | return; | 96 | return; |
| 97 | } else { | 97 | } else { |
| 98 | MyAvatar* myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar(); | 98 | auto myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar(); |
| 99 | glm::mat4 hmdToSensor = myAvatar->getHMDSensorMatrix(); | 99 | glm::mat4 hmdToSensor = myAvatar->getHMDSensorMatrix(); |
| 100 | glm::mat4 sensorToWorld = myAvatar->getSensorToWorldMatrix(); | 100 | glm::mat4 sensorToWorld = myAvatar->getSensorToWorldMatrix(); |
| 101 | glm::mat4 hmdToWorld = sensorToWorld * hmdToSensor; | 101 | glm::mat4 hmdToWorld = sensorToWorld * hmdToSensor; |
| @@ -156,6 +156,6 @@ void HMDScriptingInterface::centerUI() { · 54 unmodified lines | |||
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | void HMDScriptingInterface::snapToAvatar() { | 158 | void HMDScriptingInterface::snapToAvatar() { |
| 159 | MyAvatar* myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar(); | 159 | auto myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar(); |
| 160 | myAvatar->updateSensorToWorldMatrix(); | 160 | myAvatar->updateSensorToWorldMatrix(); |
| 161 | } | 161 | } |