Hi, I have a static mesh that when It is about to be destroyed switch to a Destructible mesh. I have using Apex Destruction to create the mesh. How can I swap them in code?
Thank you
Hi, I have a static mesh that when It is about to be destroyed switch to a Destructible mesh. I have using Apex Destruction to create the mesh. How can I swap them in code?
Thank you
The simplest way would be to have a UStaticMeshComponent in whatever actor is displaying them first. Im not too keen on what a destructible mesh is but Im sure theres a class name along the lines of UDestructibleMeshComponent or something on the internet you can find a reference to.
On construction or initialize hide the destructible mesh and dont forget to set collision to false. I dont know the functions for these things but Im sure you can find it somewhere in the documentation. For actors its a simple SetActorTickEnabled(false) SetActorHiddenInGame(true).
Then its a simple matter of having a function that hides the static mesh and then reversing the options for the destructible mesh and setting the location and rotation to the static meshes location
Cheers
Thank you it works perfectly