Ram into a destrucible mesh with condition?

Hello everyone !

I’m new to destructible meshes and I have a question for a side project I’m doing. I have a character that can dash into some objects and I want my character to destroy walls super easily just like Hulk would smash a concrete wall.

Instead, my character just stop instantly in front of the mesh that barely break but stand still. I want my character to wreck the wall into pieces that will fly away. Also, I have a condition for it to be possible, which add a layer of difficulty. I want the object to explode only if the player has a boolean to true, and don’t break AT ALL if the boolean is false.

128301-ram.jpg

Thanks !

Just a spitball thought…First disable impact damage and use only damage threshold (via directly applied damage), that way if the bool is false running into it won’t cause it to fracture, then set the damage required for fracture to something very specific or ridiculous like 17405129 and make sure accumulate damage is off (so that that exact amount of damage is needed to fracture the DM and an accidental discharge from some random goon with a rifle doesn’t set it off) then setup an apply damage that is triggered or enabled when the bool is set to true and when the character impacts the wall, also to create the exploding/parts flying all over use an add impulse at location (impact location) to bounce the pieces away from the character. Not perfect but something to work with at least.

Ok that was what I espected as an answer. I will try it and report back my experience.

Edit : Ok I’m on a good way. Now the problem is that I can push the object away ! Is there a way to make a non moving breakable mesh ? I’m sure that must be possible.

If anyone has the same need, I found a workaround for my specific case. As I need the player to go at a certain speed to break the crate, I can allow myself to bring the collision to the front of the player.

What I did was creating a new collision capsule in front of the player, and apply all my scripting to it. As the player go fast, you can’t see that the crate explode before you “physically” touch it. The crate has an internal function that apply damage to itself with a good radius, and uses the hit value to know where the impact point is for more realism. It works really good for my situation.