queryAABox wasn't centered on object

This commit is contained in:
Seth Alves 2015-12-18 14:46:24 -08:00
parent b9a7ed8560
commit 69bba4a182

View file

@ -567,8 +567,9 @@ bool SpatiallyNestable::setPuffedQueryAACube() {
}
bool success;
AACube currentAACube = getMaximumAACube(success);
// make an AACube with edges twice as long and centered on the object
_queryAACube = AACube(currentAACube.getCorner() - glm::vec3(currentAACube.getScale()), currentAACube.getScale() * 2.0f);
// make an AACube with edges thrice as long and centered on the object
_queryAACube = AACube(currentAACube.getCorner() - glm::vec3(currentAACube.getScale()), currentAACube.getScale() * 3.0f);
// _queryAACube = AACube(currentAACube.getCorner(), currentAACube.getScale());
_queryAACubeSet = true;
return true;
}