Help With Foliage Collision

Hello,

I’m learning Foliage and using Lyra. I’m able to block all on things like Rocks and Trees and that works well but I’m have issues with more leafy substances like wheat and corn.

I’m having the following questions.

  1. How do I set it so the bots can’t see through it? I’ve tried the following and it doesn’t seem to work.

  2. Any good turtorials on how to make so the foliage moves as players and bots move through it. I’ve only seen one and it seems a bit hacky. I’m look for best practice.

Regards,
Kevin

Hi, Buckley,

What you’re asking isn’t a quick fix. These things require quite a bit of experience in the Engine before tackling them (otherwise you get hacky results).

To your first question:

You need to verify if these assets even have collision. To do that, you would open the Static Mesh Window, and check for its collisions. Usually the collision for woody/branchy foliage will only cover the thickest parks of the mesh, NOT the leaves.

If the leaves do have collision (unlikely in simple, but maybe complex), it is possible that because leaves are not a solid surface, all of the holes between them make them unsuitable as a “wall”. You can add collision to correct this:

To you second question:

Add this behavior In-Engine? VERY unlikely. You should use Blender to achieve physical behaviors (at least in all versions prior to 5.4). If you DO want to create these in Unreal, try using 5.4, HOWEVER, 5.4 is new, and community documentation is still in its infancy.

Hi,
It can be a lot more optimal to use a system where the foliage movement is done with WPO in the material based on a rendertarget with areas drawn for where the movement is wanted,

I wrote a system like this for work which is very optimal, even has things like GPU fire propagation in it virtually for free. One using a similar system (without the fire propagation) is on the marketplace and I’d recommend using something like that:

https://www.unrealengine.com/marketplace/en-US/product/prismatiscape-interaction-plugin

1 Like

Thank you for your reply. I’ve checked the collision on the Mesh. That is correct. If I put block all on the objects the AI can’t shoot or see through the Mesh.

In the instance of the corn field, where I’m only trying to block visibility there are like 100 crops between me and the AI Bots so they cover all the angles. I can’t see the AI Bot’s to shoot back at them but they can shoot at me.

If the Mesh is setup correctly and there are enough crops to block the vision of the AI Bot does the Collision settings on the Foliage I posted look like it should cover it?

Thank you.

I was looking at doing it with World Position Offset and putting collision bubbles around the characters hands and feet. I think your solution may do something similar based on what I saw in your YouTube video. Either way I’ll buy the plug-in and try it out. I’m still pretty new at this so I’m sure I’ll learn something from it.

2 Likes