Having quick-watched all the videos of the Chaos Destruction Learning Path and read the acompanying text, I still don’t have a clue how to go about it.
The documentation of UGeometryCollectionComponent is a little more helpful.
Maybe someone can confirm that the following steps are indeed the steps to set up my chaos destruction:
- I have a couple of actors, the asteroids, that have a static mesh component that I want to chaos-destruct upon collision (and when the player shoots them)
- I can add a
UGeometryCollectionComponent
to every asteroid actor - I don’t know how, but I somehow initialize each
UGeometryCollectionComponent
First problem here:
When setting up a Geometry Collection in the editor, I click the actor with a static mesh, go to fracture mode and then ‘new’. I can’t find a method in the UGeometryCollectionComponent
that allows me to set the actor, static mesh, or collection of static meshes that the component uses.
- I apply a fracture with some random seed for every asteroid, e.g. in
BeginPlay
- I use UGeometryCollection::ApplyPhysicsField when I want a asteroid to break (I still have to figure out the details here)
Second problem here:
I want the resulting parts of the asteroid destruction to turn into new asteroids, i.e. actors with static mesh component. I don’t know what kind of output the chaos destruction produces and how to get all the resulting actors, if any.