Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 62 files). Show all
Unified · Split
| @@ -385,7 +385,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 384 unmodified lines | ||
| 385 | 385 | properties.setParentJointIndex(entity->getParentJointIndex()); |
| 386 | 386 | } |
| 387 | 387 | if (!scriptSideProperties.localPositionChanged() && !scriptSideProperties.positionChanged()) { |
| 388 | − properties.setPosition(entity->getPosition()); | |
| 388 | + properties.setPosition(entity->getWorldPosition()); | |
| 389 | 389 | } |
| 390 | 390 | if (!scriptSideProperties.localRotationChanged() && !scriptSideProperties.rotationChanged()) { |
| 391 | 391 | properties.setRotation(entity->getOrientation()); |
| @@ -1797,7 +1797,7 @@ glm::mat4 EntityScriptingInterface::getEntityTransform(const QUuid& entityID) { · 1405 unmodified lines | ||
| 1797 | 1797 | _entityTree->withReadLock([&] { |
| 1798 | 1798 | EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(entityID)); |
| 1799 | 1799 | if (entity) { |
| 1800 | − glm::mat4 translation = glm::translate(entity->getPosition()); | |
| 1800 | + glm::mat4 translation = glm::translate(entity->getWorldPosition()); | |
| 1801 | 1801 | glm::mat4 rotation = glm::mat4_cast(entity->getRotation()); |
| 1802 | 1802 | result = translation * rotation; |
| 1803 | 1803 | } |