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
388388 properties.setPosition(entity->getWorldPosition());
389389 }
390390 if (!scriptSideProperties.localRotationChanged() && !scriptSideProperties.rotationChanged()) {
391− properties.setRotation(entity->getOrientation());
391+ properties.setRotation(entity->getWorldOrientation());
392392 }
393393 }
394394 properties = convertLocationFromScriptSemantics(properties);
@@ -1798,7 +1798,7 @@ glm::mat4 EntityScriptingInterface::getEntityTransform(const QUuid& entityID) { · 1403 unmodified lines
17981798 EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(entityID));
17991799 if (entity) {
18001800 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());
18021802 result = translation * rotation;
18031803 }
18041804 });