Chaos Destruction change mesh at runtime

Hey guys,

I have been trying to work somethings out with Chaos Destruction but can find how to set the Rest Collection of a Geometry Collection component at runtime. Not sure if I’m just not setting it or its called something different. Because it seam very strange that you wouldn’t be able to set the mesh at run time meaning I guess you would need sperate actors for every possible geometry collection used for destruction.

Any help would be amazing and I will post here if I find the answers.

Thanks.

Hey! Have you found any solution for this? I am experiencing the same problems.

With kind regards,

Eric

Hey, no it just doesn’t seam possible to change a Geometry Component’s Rest Collection though code, at least not in blueprint. Maybe there is a way in C++ but I dont know what that is.

Thank you for getting back at me.

Since I still want to have some sort of dynamic creation I created an actor with an enum to switch selection. Based on the selection I added the node: Add Geometry Collection Component → And set the variables manually there.

i am having the same issue, i am trying to change the chaos destruction mesh using a data table at begin play.
did you mange to change the mesh at runtime ?
what variable are you setting ?
a screenshot would be much appreciated.

Yes ofcourse! This is how I did it in my building system:

I made a blueprint called chaos spawn:
image
That blueprint has some enumerations exposed on spawn so I can switch between different nodes. There I add geometry collection dynamicly and set is values in the detail panel since I can’t set the geometry collection any other way.

Let me know if this helps.

With kind regards,

Eric

1 Like

thank you for the reply.
that’s an interesting take on the problem you got there.
i didn’t think of that.
what i ended up doing is creating a class with geometry collection component in it.
then create a bunch of child blueprints of that class each one to hold the different geometry collections i have, then i choose the correct class to spawn using a data table.
actually the way you’re doing it might be better than mine since you don’t have to create a bunch of different classes that only hold GC, only down side is that enum can get a bit heavy and confusing depending on how many GC you have.

i also think this is the way to have custom geometry meshes spawning based on a variable etc. Tried some different things, but add geometry collection works best. If you try to spawn an actor, and try to set the rest collection variable, there are issues.