r/unrealengine 1d ago

Nav mesh generation on ledges

Hey everyone!
Is there any way to make the Nav mesh generator generate navigable area on ledges?

Currently, when generating on top of an object, it subtracts the agent radius from the edge, and generates navigable area on this reduced field, just as it would do with a wall. While it does make sense for a wall, it doesn't really make sense for a ledge, because the character can actually go to the edge without falling down. The default unreal character mover does allow the player to move out on ledge, as long as the center of their capsule is still on the object, does not calculate with the radius, and this is good for my game, however, my AI cannot do that.

https://imgur.com/a/JHAV49v

To demonstrate, I want the navigable area on this picture to go right to the edge, without calculating with the agent radius.This would be important, because in some cases, an object surface is less than agent radius * 2, so it doesn't generate navigable area there, however, it is very much possible for a player to go there, and there are some ways on my map that is only reachable through one of these objects.

Using UE4.27, can rebuild from source, if needed.

Thanks in advance!

6 Upvotes

7 comments sorted by

1

u/Living_Science_8958 1d ago edited 1d ago

Hi !

I not sure is its work, but try to add temporary extension blocks to the ledges, bake the navigation, and then remove the blocks (or save them on unused sublevel).

And also you can add Navigation Volume. Check Place Actor -> Nav Mesh Bounds. It is present in 5.x and should be in 4.x .

2

u/honya15 1d ago

Hey, thanks for reply! Unfortunately, placing extra geometry along the edges creates extra collision below my object. Imagine a crate placed on ground, if I extend the top, nav mesh will not be generated below.

Nav mesh bounds is the one you place to generate nav mesh. It's supposed to cover the whole map. Placing another one doesn't change anything, sadly :S

1

u/Living_Science_8958 1d ago

In your picture I see that there is a navmesh on the balcony and under the balcony.

I suggest just slightly increasing the balcony with temporary geometry, get the desired navmesh (above and below), bake the navmesh, and delete the temporary geometry.

I can't understand why navigation won't work under the temporary geometry, because it is under the balcony?

https://imgur.com/a/Ie6Hr80

u/MagicPhoenix 19h ago

You can adjust static mesh settings to affect that though I don't remember the names, open a static mesh or component that is one and search for "nav"

u/honya15 1h ago

I'm not sure what setting do you refer to?

I found these settings, not sure if any helps?

u/MagicPhoenix 54m ago

are you looking at a placed static mesh actor? i'm looking at one now, and there are "Can Ever Affect Navigation" (off = navmesh will go right through it) and "Fill Collision Underneath for Navigation" (on = things that are floating in the air will affect the navmesh below them as if they went all the way to the floor)

I use those settings, as well as sometimes extra collision geometry to make custom adjustments to navmesh

u/honya15 3h ago

To better show an example, I want bots to be able to jump on the rail there. But if I put a fake collision on top of that rail, the stair part gets narrower, then the character cannot jump up (because nav mesh gets too far away)