diff --git a/libraries/shared/src/SpatiallyNestable.cpp b/libraries/shared/src/SpatiallyNestable.cpp index 1a897021f1..56532c04f4 100644 --- a/libraries/shared/src/SpatiallyNestable.cpp +++ b/libraries/shared/src/SpatiallyNestable.cpp @@ -519,7 +519,13 @@ const Transform SpatiallyNestable::getTransform(int jointIndex, bool& success, i success = false; // someone created a loop. break it... qDebug() << "Parenting loop detected."; - getThisPointer()->setParentID(QUuid()); + SpatiallyNestablePointer _this = getThisPointer(); + _this->setParentID(QUuid()); + bool setPositionSuccess; + AACube aaCube = getQueryAACube(setPositionSuccess); + if (setPositionSuccess) { + _this->setPosition(aaCube.calcCenter()); + } return jointInWorldFrame; }