History

migrate SpatiallyNestable::getOrientation to getWorldOrientation, remove redundant getRotation

ZappoMan committed 9 years ago

Commit f63db421 parent a7a0f0348 files · +141 −145Browse files

Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 48 files). Show all

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+2−2
@@ -388,7 +388,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 387 unmodified lines
388 properties.setPosition(entity->getWorldPosition());388 properties.setPosition(entity->getWorldPosition());
389 }389 }
390 if (!scriptSideProperties.localRotationChanged() && !scriptSideProperties.rotationChanged()) {390 if (!scriptSideProperties.localRotationChanged() && !scriptSideProperties.rotationChanged()) {
391 properties.setRotation(entity->getOrientation());391 properties.setRotation(entity->getWorldOrientation());
392 }392 }
393 }393 }
394 properties = convertLocationFromScriptSemantics(properties);394 properties = convertLocationFromScriptSemantics(properties);
@@ -1798,7 +1798,7 @@ glm::mat4 EntityScriptingInterface::getEntityTransform(const QUuid& entityID) { · 1403 unmodified lines
1798 EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(entityID));1798 EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(entityID));
1799 if (entity) {1799 if (entity) {
1800 glm::mat4 translation = glm::translate(entity->getWorldPosition());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 result = translation * rotation;1802 result = translation * rotation;
1803 }1803 }
1804 });1804 });