not a parent or child doesn't mean always recompute queryAACube

This commit is contained in:
Seth Alves 2017-10-13 09:29:50 -07:00
parent ae70f091c3
commit cf960dc44b

View file

@ -969,7 +969,7 @@ bool SpatiallyNestable::checkAndMaybeUpdateQueryAACube(bool forcePuffed) {
AACube maxAACube = getMaximumAACube(success);
if (success) {
// maybe update _queryAACube
if (!_queryAACubeSet || (_parentID.isNull() && _children.size() == 0) || !_queryAACube.contains(maxAACube)) {
if (!_queryAACubeSet || !_queryAACube.contains(maxAACube)) {
if (forcePuffed || _parentJointIndex != INVALID_JOINT_INDEX || _children.size() > 0 ) {
// make an expanded AACube centered on the object
float scale = PARENTED_EXPANSION_FACTOR * maxAACube.getScale();