tree cutting


I’m trying to create a survival game, I created the foliage (tree, grass flower…) from the foliage editor. Now I want to implement tree cutting system, i watched this video : In his video he created tree actor but i don’t want to create actor because I have approximately 7k tree and I don’t want to place 7k tree manually.

I’ve created this BP code, he destroys the tree I’m looking at.

Now I want to add child component at this tree component it is possible ? I’ve tried many things but not working.

PS : Sorry for my bad English I’m french :slight_smile:

If you are using a recent version of Unreal, there are “actor foliage” that you can paint with the foliage tool, maybe it could suit your needs :slight_smile:

Actor foliage is not instanced, so it sucks up a lot of resources. With 7k actors you’d be running pretty low on resources.

The replacement to blueprint is commonly done by code. Like my addon does for instance:

The short and sweet of it, you have an area around the player that detects the foliage and replaces it to the proper blueprint if required. And undoes the change if appropriate when exiting the area.

You can actually use a trace that will hit the instance foliage then get the transform from that and spawn an actor using that transform