Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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?

Product Version: UE 4.10
more ▼

asked Nov 20 '15 at 02:48 PM in Using UE4

avatar image

6 3 5 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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: https://wiki.unrealengine.com/Destructible_Troubleshooting_Guide#Why_is_my_DM_floating_above_the_ground.2C_or_why_is_collision_not_matching_the_mesh.3F_Why_doesn.E2.80.99t_the_collision_of_my_DM_match_my_Static_Mesh_where_I_setup_my_collision.3F

I hope this helps.


more ▼

answered Nov 20 '15 at 03:04 PM

avatar image

Tim Hobson ♦♦ STAFF
48.7k 888 103 880

avatar image CloudMonster Nov 20 '15 at 04:32 PM

Thanks Tim 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.

avatar image Tim Hobson ♦♦ STAFF Nov 20 '15 at 05:09 PM

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.

avatar image Tim Hobson ♦♦ STAFF Nov 20 '15 at 05:09 PM

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.

avatar image CloudMonster Nov 21 '15 at 02:26 AM

Thanks Tim 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?

avatar image Tim Hobson ♦♦ STAFF Nov 23 '15 at 04:51 PM

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

alt text

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.

bplogic.png (119.5 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question