Add new collision (for overlap check) for each instanced mesh?

Hello,

I’m currently spawning trees as instanced meshes. I have at the moment a simple collision set up on my SM_Tree to avoid walking through it.

I’m looking for a way to check if actor’s (villagers in RTS-game) are in the range of the tree (the instanced mesh) so I was hoping to create a second collision capsule to check for overlaps.

326494-screenshot-2021-01-06-193322.png

This does not yield the right results as it is only the first tree mesh that get’s that collision capsule (the red one in the middle. As you can see, the other instanced meshes (grey) don’t have one).

Is there a way to add collisions for each instanced mesh, ot should I use another way of working?

ISMs are really for interactions. They are meant for drawing the same mesh efficiently. You should use the normal Static Mesh Component. I’m not certain if that solves your problem though, but if you know you set up the bp logic correctly, it should resolve.

Awesome! Very nice solution.

ConradG, thank you for your reply.

I’m currently working on a way to transform the instanced mesh to a BP whenever it is in range of a villager or the player itself. This currently gives me the results I want:

326528-ezgifcom-optimize.gif

Resources on this are:

-UE4 - Interact with Foliage at Run-time (Cut down trees, remove foliage, etc...) - YouTube

-https://www.woodbound.smallheartstudios.com/single-post/2017/10/08/tutorial-procedurally-placed-cut-able-trees-in-ue4

-16K of Interactable Trees with no framerate dip! Secret? Automatic swapping of Static Mesh with Blueprint! [Tutorial Coming] : unrealengine