Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 5 files). Show all
Unified · Split
| @@ -180,8 +180,7 @@ EntityItemID EntityScriptingInterface::findClosestEntity(const glm::vec3& center · 179 unmodified lines | ||
| 180 | 180 | EntityItemID result(UNKNOWN_ENTITY_ID, UNKNOWN_ENTITY_TOKEN, false); |
| 181 | 181 | if (_entityTree) { |
| 182 | 182 | _entityTree->lockForRead(); |
| 183 | − const EntityItem* closestEntity = _entityTree->findClosestEntity(center/(float)TREE_SCALE, | |
| 184 | − radius/(float)TREE_SCALE); | |
| 183 | + const EntityItem* closestEntity = _entityTree->findClosestEntity(center, radius); | |
| 185 | 184 | _entityTree->unlock(); |
| 186 | 185 | if (closestEntity) { |
| 187 | 186 | result.id = closestEntity->getID(); |