Is it possible to reset a destructible mesh to initial state with print?
Hey deusduke,
You can’t reset it, but you can respawn it easily enough. Create a Blueprint with Destructible Mesh as its component. In your Level Blueprint (or wherever you’re spawning it from), use Spawn Actor From Class node and choose your new Blueprint as class. Give it same transform as original, and you’ll have a new instance of same Destructible Mesh where first one was.
In example below, I have my Destructible Mesh’s Blueprint in my level above ground a bit so that it falls and breaks when I hit Play. Level Blueprint gets its starting Transform, waits a couple of seconds, then spawns a new Destructible using original’s transform.
If you’re looking for something more complex involving rebuilding Destructible from pieces of original, you’ll need to do that through animation instead.
Hope that helps!
Hello thanks for your quick reply! I was hoping to avoid destroying and creating a new mesh because I thought there might be a performance hit. However if that’s only way then no problem. Thanks for providing logic as well!
Hey there,
For anyone wondering, there is actually a simpler way to do this. You can just remove destructible mesh from component and set it again. This will effectively regenerate mesh inside already placed actor, so you do not need to respawn it, just refresh destructible mesh.
Cheers,
David