Destructible Mesh Set Collision Enabled Bug?

I’ve been messing with this destructible mesh all day and night and I’ve come to the conclusion that this is a bug, but I wanted to ask here first to make sure I’m not just completely missing something.

I have a destructible mesh that starts hidden. After a specific event, it becomes visible and should have collisions enabled to query and physics.

I’ve set this up in BP like so:

But the print always comes back “No Collision”. I tried this in a clean project with the same SM/DM to the same result.

Can DM’s not have their collisions changed? Is this a bug or just a limitation of DM’s?

Hi, Azaii.

I know this question is starting to age a bit, and you might have already found the answer or have figured out a workaround by now, but I wanted to reply because I’m having the exact same issue and your question was the first one I came across while searching the web.

After some digging, I determined that this is an issue with the engine — UE-7162. Unfortunately, this has been going on a long while, and the issue is marked as “Won’t Fix” — meaning you and I (and others) will have to rely on workarounds to get the job done. (You can read more about the reason why the issue won’t be fixed in this other Answerhub thread from a couple of years ago. The short story: APEX destruction is on its way out.)

With the new Chaos physics engine being right around the corner (beta coming with 4.23), hopefully we’ll see a resolution to this problem as a positive side effect of that upgrade. (Not to mention all of the cool new features Chaos will bring with it.)

I know this ‘answer’ doesn’t actually solve your problem (or mine), but at least we can be sure what’s going on (it’s definitely an engine issue). And hopefully this response will help others discover this information a little bit quicker.

Hey the_batch! Thank you for the answer. I couldn’t find any information about this or I wouldn’t have posted myself. Good to know there will be another, probably better, solution coming soon. : )

The problem may be the asynchronous nature of the PhysX engine. You basically call SetCollisionEnabled, then the data is sent to the physics engine and it changes the collision settings in parallel. Meaning that it has most likely not finished setting the collision profile when you call GetCollisionEnabled. Put a delay node between set and get with a small time and it should work. This is not optimal, but till now I haven’t found any callback event from the physics engine that tells me that it has (successfully) changed the collision settings. The same problem arises when applying damage. But there you have the OnComponentFractured event that tells you that the engine has finished breaking chunks after receiving damage. E.g. if you damage the destructible mesh and right after that add an impulse to a chunk, it won’t work because at this time there are no lose chunks you could add impulse to. But in the OnComponentFractured event which is called once the physics engine has finished they’ll be there.