Collision changes when asset changed to destructible mesh

I have tree assets, made destructible meshes out of them. once i do that the collision is way different blocking my character from getting near it. Also if i set them to take impact damage they will fracture way before the normal assets collision. Its like the collision changes when i make a destructible mesh and i dont know how to fix this. Any help?

Hi CloudMonster,

Trees without a very specific setup (outside of UE4) will produce this type of issue. Destructibles meshes do not honor the original meshes collision. Instead it generates a single convex hull for each chunk and one for the base mesh that is not fractured.

For more information you can have a look at the Destrucitble Troubleshooting and Tips Guide I wrote for the Wiki a while back here: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

I hope this helps.

Tim

Thanks that did help me understand that destructible meshes make random simple hull collisions, but I want to make trees get destroyed when attacked but still keep a reasonable collision. Is there a way to get this to happen?

Something like the tree falls over(physics enabled?) when health = 0, then destroys itself. I’m not a good at programming and using blueprints.

To have that much control over the mesh it would really be best to use something like Blueprints to setup some simple logic.

I would only suggest destructible meshes for much simpler geometry and for more basic things like walls, cover items, rocks, statues, and things of that nature. While we would love to improve the Destructible Mesh system to be more robust, it’s just something we don’t have the resources to do at this time unfortunately.

So for something like this setup.

  • Mesh should be prefractured in a modeling program
  • Import each mesh separately (Base Mesh, Chunk 1, Chunk 2, etc)
  • Use BP to set up simple logic and switch out mesh on hit or when it’s received enough damage.

I know the last part is a little vague, and I can’t offer anything more specific since I’ve not personally set this up for myself aside from a simple swap mesh on hit to simulate destruction. The mesh should be broken up into pieces something like this.

Base Mesh: Tree Mesh
Chunk 1: Stump/root of tree
Chunk 2: Mid section of tree
Chunk 3: Top section of tree

Anything after the root can have as many as you’d like, but when you set up the logic to remove the base mesh and spawn in the others you’d have to spawn them all in so they are where they need to be relative to each other. Then for each chunk once they’ve received enough damage you would set them to simulate physics so they fall accordingly.

This can get complicated quickly because you would need to set up the logic like this:

If the stump/root of the tree is hit to knock it down you would need to set any mesh after that chunk to simulate physics as well so that they all fall over.

If the top of the tree is hit and you don’t want it to affect the lower parts you would need to only set simulate physics on for that one. So while this can seem overwhelming, with some time spent doing basic blueprint type work it shouldn’t be too hard to figure out, especially if you dont have as many chunks after the root. That’s the part that can get complex more quickly because you’re increasing the amount of BP logic needed to make things look right.

It’s something I would like to setup an example of at some point to add to the Wiki Guide, but I’d just not found the time to do so.

Thanks that is similar to what I was thinking of doing. To swap the simple mesh with a BP class when damaged, that looks the same but can break apart. I honestly don’t care to be to realistic where hitting different parts of the tree will matter. So I guess I should start by taking my tree mesh and fracturing it in blender, import it to ue4 then make a class out of it and then figure out how to swap it with the static tree mesh on damaged.
Any tips on the BP script for that?

So here is a simple breakdown for how I’ve set it up quickly in the past.

This is just the layout, not one that I actually setup with a mesh, but this setup will work.

What you’ll want to do.

  • Create a BP
  • Add the Base Mesh (Unfractured)
  • Add each chunk static mesh (Fractured chunks) and set the option for visible to unchecked.

Now the break down of the event graph.

  1. This is your base mesh plugged in. It’s setup to so that an Event is fired off when the Base mesh is hit. (There is no logic to say how much damage it needs to receive, so it’s an instant switch on hit)
  2. All the meshes here are the chunks and this is setting the visibility of them so that they replace the base mesh.
  3. This is the same chunks that now when they are shot will simulate physics on hit.

I think that should be the gist of the setup. I hope it helps.