Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 48 files). Show all
Unified · Split
| @@ -388,7 +388,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 387 unmodified lines | ||
| 388 | 388 | properties.setPosition(entity->getWorldPosition()); |
| 389 | 389 | } |
| 390 | 390 | if (!scriptSideProperties.localRotationChanged() && !scriptSideProperties.rotationChanged()) { |
| 391 | − properties.setRotation(entity->getOrientation()); | |
| 391 | + properties.setRotation(entity->getWorldOrientation()); | |
| 392 | 392 | } |
| 393 | 393 | } |
| 394 | 394 | properties = convertLocationFromScriptSemantics(properties); |
| @@ -1798,7 +1798,7 @@ glm::mat4 EntityScriptingInterface::getEntityTransform(const QUuid& entityID) { · 1403 unmodified lines | ||
| 1798 | 1798 | EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(entityID)); |
| 1799 | 1799 | if (entity) { |
| 1800 | 1800 | glm::mat4 translation = glm::translate(entity->getWorldPosition()); |
| 1801 | − glm::mat4 rotation = glm::mat4_cast(entity->getRotation()); | |
| 1801 | + glm::mat4 rotation = glm::mat4_cast(entity->getWorldOrientation()); | |
| 1802 | 1802 | result = translation * rotation; |
| 1803 | 1803 | } |
| 1804 | 1804 | }); |