I would like to display the health of a Geometry Collection based on its destruction state, but I cannot find a way to determine the total number of fragments each levels.
Furthermore, I only want to investigate level 1 at the top level and ignore destruction at other levels, but I don’t know how to determine which level the bone index returned by the break event belongs to.
Please tell me how to obtain these two pieces of information.
As far as I know, each bone in a Geometry Collection stores a Level attribute in its transform group, so the hierarchy depth is available per bone. It is easy to read in C++ from the rest collection, but I do not think Blueprint exposes it directly, so a small C++ helper that returns the level for a given bone index may be the simplest route.
With that in place, you could count the level 1 bones once at the start, ignore any break event whose bone index is not on level 1, and compare the number of broken level 1 bones against the total to get a percentage. It is worth checking how your engine version names these accessors, since the geometry collection API has changed between releases.
Haha, I agree that even basic statistics aren’t exposed in the blueprint. Not even once had it been possible to do that satisfactorily.