mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 19:55:07 +02:00
Merge pull request #7386 from sethalves/fix-parenting-grab
observers see parent-grabs again
This commit is contained in:
commit
0347f85d3a
3 changed files with 7 additions and 5 deletions
|
@ -1157,6 +1157,12 @@ bool EntityItem::setProperties(const EntityItemProperties& properties) {
|
|||
SET_ENTITY_PROPERTY_FROM_PROPERTIES(parentJointIndex, setParentJointIndex);
|
||||
SET_ENTITY_PROPERTY_FROM_PROPERTIES(queryAACube, setQueryAACube);
|
||||
|
||||
AACube saveQueryAACube = _queryAACube;
|
||||
checkAndAdjustQueryAACube();
|
||||
if (saveQueryAACube != _queryAACube) {
|
||||
somethingChanged = true;
|
||||
}
|
||||
|
||||
if (somethingChanged) {
|
||||
uint64_t now = usecTimestampNow();
|
||||
#ifdef WANT_DEBUG
|
||||
|
|
|
@ -55,7 +55,6 @@ void SpatiallyNestable::setParentID(const QUuid& parentID) {
|
|||
_parentKnowsMe = false;
|
||||
}
|
||||
});
|
||||
checkAndAdjustQueryAACube();
|
||||
}
|
||||
|
||||
Transform SpatiallyNestable::getParentTransform(bool& success, int depth) const {
|
||||
|
@ -140,7 +139,6 @@ void SpatiallyNestable::forgetChild(SpatiallyNestablePointer newChild) const {
|
|||
|
||||
void SpatiallyNestable::setParentJointIndex(quint16 parentJointIndex) {
|
||||
_parentJointIndex = parentJointIndex;
|
||||
checkAndAdjustQueryAACube();
|
||||
}
|
||||
|
||||
glm::vec3 SpatiallyNestable::worldToLocal(const glm::vec3& position,
|
||||
|
@ -754,7 +752,6 @@ void SpatiallyNestable::forEachDescendant(std::function<void(SpatiallyNestablePo
|
|||
}
|
||||
|
||||
void SpatiallyNestable::locationChanged() {
|
||||
checkAndAdjustQueryAACube();
|
||||
forEachChild([&](SpatiallyNestablePointer object) {
|
||||
object->locationChanged();
|
||||
});
|
||||
|
@ -781,7 +778,6 @@ void SpatiallyNestable::setQueryAACube(const AACube& queryAACube) {
|
|||
if (queryAACube.getScale() > 0.0f) {
|
||||
_queryAACubeSet = true;
|
||||
}
|
||||
checkAndAdjustQueryAACube();
|
||||
}
|
||||
|
||||
bool SpatiallyNestable::queryAABoxNeedsUpdate() const {
|
||||
|
|
|
@ -157,7 +157,7 @@ protected:
|
|||
mutable QHash<QUuid, SpatiallyNestableWeakPointer> _children;
|
||||
|
||||
virtual void locationChanged(); // called when a this object's location has changed
|
||||
virtual void dimensionsChanged() { checkAndAdjustQueryAACube(); } // called when a this object's dimensions have changed
|
||||
virtual void dimensionsChanged() { } // called when a this object's dimensions have changed
|
||||
|
||||
// _queryAACube is used to decide where something lives in the octree
|
||||
mutable AACube _queryAACube;
|
||||
|
|
Loading…
Reference in a new issue