How do I get the mass of a destroyed Geometry Collection?

I want to deal damage based on the mass of the Geometry Collection that was hit, but how do I get the mass? If it is from Hit Component, the whole geometry collection mass will be obtained.

Does anyone know anything?

Hi

There’s a blueprint function called GetMassAndExtents that allows you to get the mass and extend of a specific piece
If you want the mass of the whole geometry collection , you can call GetRootIndex on the component to get the index of the root element

I hope this helps

Hi @CedUE !

I have checked the function but I am having trouble getting the index of the collided piece.
Is there any good way to do this?

You can get the index from a line / sphere trace for example
The hit results should have an Item Index property you can pass to the GetMassAndExtents function

If you are using the Hit results from a Hit event then you the Hit Item should have this information

The return value is always -1…