History

rename SpatiallyNestable::getPosition() to SpatiallyNestable::getWorldPosition()

ZappoMan committed 9 years ago

Commit a7a0f031 parent 100031862 files · +180 −180Browse files

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

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+2−2
@@ -385,7 +385,7 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties& · 384 unmodified lines
385385 properties.setParentJointIndex(entity->getParentJointIndex());
386386 }
387387 if (!scriptSideProperties.localPositionChanged() && !scriptSideProperties.positionChanged()) {
388− properties.setPosition(entity->getPosition());
388+ properties.setPosition(entity->getWorldPosition());
389389 }
390390 if (!scriptSideProperties.localRotationChanged() && !scriptSideProperties.rotationChanged()) {
391391 properties.setRotation(entity->getOrientation());
@@ -1797,7 +1797,7 @@ glm::mat4 EntityScriptingInterface::getEntityTransform(const QUuid& entityID) { · 1405 unmodified lines
17971797 _entityTree->withReadLock([&] {
17981798 EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(entityID));
17991799 if (entity) {
1800− glm::mat4 translation = glm::translate(entity->getPosition());
1800+ glm::mat4 translation = glm::translate(entity->getWorldPosition());
18011801 glm::mat4 rotation = glm::mat4_cast(entity->getRotation());
18021802 result = translation * rotation;
18031803 }