mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 03:13:09 +02:00
try harder to put things in place when their parent entities are discovered
This commit is contained in:
parent
ef556fae9b
commit
1b0eeb9c2c
1 changed files with 8 additions and 0 deletions
|
@ -1616,6 +1616,7 @@ void EntityItem::updatePosition(const glm::vec3& value) {
|
||||||
entity->markDirtyFlags(Simulation::DIRTY_POSITION);
|
entity->markDirtyFlags(Simulation::DIRTY_POSITION);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
locationChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1625,6 +1626,13 @@ void EntityItem::updateParentID(const QUuid& value) {
|
||||||
// children are forced to be kinematic
|
// children are forced to be kinematic
|
||||||
// may need to not collide with own avatar
|
// may need to not collide with own avatar
|
||||||
markDirtyFlags(Simulation::DIRTY_MOTION_TYPE | Simulation::DIRTY_COLLISION_GROUP | Simulation::DIRTY_POSITION);
|
markDirtyFlags(Simulation::DIRTY_MOTION_TYPE | Simulation::DIRTY_COLLISION_GROUP | Simulation::DIRTY_POSITION);
|
||||||
|
forEachDescendant([&](SpatiallyNestablePointer object) {
|
||||||
|
if (object->getNestableType() == NestableType::Entity) {
|
||||||
|
EntityItemPointer entity = std::static_pointer_cast<EntityItem>(object);
|
||||||
|
entity->markDirtyFlags(Simulation::DIRTY_POSITION);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
locationChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue