I have a geometry collection in an actor which gets removed on sleep after a short period:
This works nicely, the fragments become smaller and disappear over time after the collection is fractured. However, as the geometry collection is inside an actor, I’d like to destroy the actor when the geometry collection has disappeared completely.
I can get removal events for the bones
with the following setting:
I have a hacky solution which includes counting the bones and counting the removal events. With this, I can detect when all the bones were removed. I could also add up the removed mass from the removal events and check that against the total mass. However, this both is not really elegant. So my question is whether there’s an event that’s fired when all the bones have been removed?
If anyone is interested how I am doing this at the moment: You have to set “notify removals” in the geometry collection component either via BP or in the details panel
Add the “On Chaos Removal” event to your graph, set up a “removed mass” variable
the mass from the removal event is accumulated in this variable, and if the removed mass is > 99% of the total mass, the actor is removed.
You can see that I have a variable “scaled total mass”. If found that you can’t simply use the mass from the geometry collection, because the scale of the actor that contains the geometry collection changes the mass, so I use
I guess this is required because as default, “mass as density” is selected after creating geomtry collections:

I guess depending on this setting, the scaling of the mass might not be necessary, but I did not dig deeper into this at the moment.
However, this is not 100% reliable, sometimes pieces of the geometry collection behave wierdly. So as safety measure, I also set a finite life span for the actor.