How to change collision response on Chaos geometry collection

I’ve managed to do this with a specific setup at the geometry collection:
Level0: Root
Level1: Cluster
Level2: Leaves

The hierarchy looks like this:

And then in CollisionProfilePerLevel I’ve set it like this: {Destructible, Destructible, DestructibleNoPawn}. This way it works for me. (Note that DestructibleNoPawn is a custom CollisionProfile I’ve made, just like Destructible but with the Pawn collision disabled).

You could also check UGeometryCollectionComponent::SetPerParticleCollisionProfileName as it takes precedence over UGeometryCollectionComponent::SetPerLevelCollisionProfileNames and you can set the specific there.

Something that confused me a bit at the gegginning is what “BoneIds” or Particles. They are all int32 and they refer to the index of the destructible piece. It’s the same as the number on the leftmost column at the Fracture Hierarchy in my image.

Then you also have “Facades” like FCollectionHierarchyFacade or FGeometryCollectionDynamicStateFacade among others that let you query the info for different particles. You can see usage examples in the codebase and use them to query some state you may be interested in.

Disclaimer: I’m still learning this system so I might be wrong! I thought I could give at least some direction though.

2 Likes