This commit is contained in:
Seth Alves 2015-12-21 14:45:18 -08:00
parent 76df582a6c
commit c84fa5f821
3 changed files with 4 additions and 4 deletions

View file

@ -281,7 +281,6 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties&
// if we've moved an entity with children, check/update the queryAACube of all descendents and tell the server
// if they've changed.
// TODO -- ancestors of this entity may also need to expand their queryAACubes.
entity->forEachDescendant([&](SpatiallyNestablePointer descendant) {
if (descendant->getNestableType() == NestableType::Entity) {
EntityItemPointer entityDescendant = std::static_pointer_cast<EntityItem>(descendant);

View file

@ -513,7 +513,6 @@ void EntityMotionState::sendUpdate(OctreeEditPacketSender* packetSender, const Q
// if we've moved an entity with children, check/update the queryAACube of all descendents and tell the server
// if they've changed.
// TODO -- ancestors of this entity may also need to expand their queryAACubes.
_entity->forEachDescendant([&](SpatiallyNestablePointer descendant) {
if (descendant->getNestableType() == NestableType::Entity) {
EntityItemPointer entityDescendant = std::static_pointer_cast<EntityItem>(descendant);

View file

@ -14,6 +14,8 @@
#include "DependencyManager.h"
#include "SpatiallyNestable.h"
const float defaultAACubeSize = 1.0f;
SpatiallyNestable::SpatiallyNestable(NestableType nestableType, QUuid id) :
_nestableType(nestableType),
_id(id),
@ -539,7 +541,7 @@ void SpatiallyNestable::locationChanged() {
}
AACube SpatiallyNestable::getMaximumAACube(bool& success) const {
return AACube(getPosition(success) - glm::vec3(0.5f), 1.0f); // XXX
return AACube(getPosition(success) - glm::vec3(defaultAACubeSize / 2.0f), defaultAACubeSize);
}
void SpatiallyNestable::setQueryAACube(const AACube& queryAACube) {
@ -607,7 +609,7 @@ AACube SpatiallyNestable::getQueryAACube(bool& success) const {
return _queryAACube;
}
success = false;
return AACube(getPosition(success) - glm::vec3(0.5f), 1.0f); // XXX
return AACube(getPosition(success) - glm::vec3(defaultAACubeSize / 2.0f), defaultAACubeSize);
}
AACube SpatiallyNestable::getQueryAACube() const {