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
385 properties.setParentJointIndex(entity->getParentJointIndex());385 properties.setParentJointIndex(entity->getParentJointIndex());
386 }386 }
387 if (!scriptSideProperties.localPositionChanged() && !scriptSideProperties.positionChanged()) {387 if (!scriptSideProperties.localPositionChanged() && !scriptSideProperties.positionChanged()) {
388 properties.setPosition(entity->getPosition());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->getOrientation());
@@ -1797,7 +1797,7 @@ glm::mat4 EntityScriptingInterface::getEntityTransform(const QUuid& entityID) { · 1405 unmodified lines
1797 _entityTree->withReadLock([&] {1797 _entityTree->withReadLock([&] {
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->getPosition());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->getRotation());
1802 result = translation * rotation;1802 result = translation * rotation;
1803 }1803 }