Box volume navigation component for pawn


I want to add a box volume to my pawn, so that when the pawn (AI) goes around a corner, it accounts for the width of the box volume as well (instead of only looking at the capsule component).

I tried adding a box volume component and playing around with some options, but I couldn’t get it right. I tried looking for ways to make the capsule component a box, but there are none. Any ideas?



In your level press P, this will highlight the navigation mesh, this is the area where the AI can walk. Then search in your world outliner for navmesh and click on: RecastNavmesh.
Now in the details panel of this try changing some of the values until you see the corners of the navmesh as sharp as possible.
I think this will get you closer to the behaviour that you want.

To do this right you need to change the pathfinding costs calculation but that is a bit harder.

Hope this helps :slight_smile:

Not really what I am looking for. The problem is not that the navmesh is not sensitive enough, it is that i cant get the box component to interact with navigation.

This is what I mean.

I want this box to behave the same as the capsule. I want it to collide with other objects and for the pawns pathfinding to account for it.

ok, I see, to do this right you’ll have to dig in the c++ code.

Right now the pathing system only works with agents and these have a round collision. You can try to put the radius of your agent(AI) like the width of your box. But this is not completely what you want.

You can also try to put the collision of your box component on block static (it looks like is is off)

I set it on BlockAll, and turned Dynamic obstacle on. If I switch it off this happens:

Would this work with a few capsule volumes instead of a box?

Set the “should update navmesh” bool to false in the box’s details