Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -1736,9 +1736,7 @@ glm::mat4 EntityScriptingInterface::getEntityTransform(const QUuid& entityID) { · 1735 unmodified lines | |||
| 1736 | if (entity) { | 1736 | if (entity) { |
| 1737 | glm::mat4 translation = glm::translate(entity->getPosition()); | 1737 | glm::mat4 translation = glm::translate(entity->getPosition()); |
| 1738 | glm::mat4 rotation = glm::mat4_cast(entity->getRotation()); | 1738 | glm::mat4 rotation = glm::mat4_cast(entity->getRotation()); |
| 1739 | glm::mat4 registration = glm::translate(ENTITY_ITEM_DEFAULT_REGISTRATION_POINT - | 1739 | result = translation * rotation; |
| 1740 | entity->getRegistrationPoint()); | ||
| 1741 | result = translation * rotation /* * registration */; | ||
| 1742 | } | 1740 | } |
| 1743 | }); | 1741 | }); |
| 1744 | } | 1742 | } |
| @@ -1753,9 +1751,7 @@ glm::mat4 EntityScriptingInterface::getEntityLocalTransform(const QUuid& entityI · 8 unmodified lines | |||
| 1753 | if (entity) { | 1751 | if (entity) { |
| 1754 | glm::mat4 translation = glm::translate(entity->getLocalPosition()); | 1752 | glm::mat4 translation = glm::translate(entity->getLocalPosition()); |
| 1755 | glm::mat4 rotation = glm::mat4_cast(entity->getLocalOrientation()); | 1753 | glm::mat4 rotation = glm::mat4_cast(entity->getLocalOrientation()); |
| 1756 | glm::mat4 registration = glm::translate(ENTITY_ITEM_DEFAULT_REGISTRATION_POINT - | 1754 | result = translation * rotation; |
| 1757 | entity->getRegistrationPoint()); | ||
| 1758 | result = translation * rotation * registration; | ||
| 1759 | } | 1755 | } |
| 1760 | }); | 1756 | }); |
| 1761 | } | 1757 | } |