#Automatic nav mesh link generation for AI that can navigate on walls and ceilings

4 messages · Page 1 of 1 (latest)

boreal quail
#

So nav meshes only really work with a single 'up' direction, but I want to create enemies that can move on all surfaces. It's easy enough to generate 6 nav meshes; I am okay with designing areas around this. But, in order to navigate from one mesh to another, there must be hand-placed nav mesh links. Even in a relatively simple environment this becomes quite the chore. I need to find a way to speed this up by either generating them at runtime or making them easier to place. Does anyone have any idea how to do this?

karmic pelican
#

You can have your floors/walls/cells well structured in your Unity hierarchy, browse it, map them by bounds, and then generate the mapmesh links with some forloop on each wall/floor and wall/ceiling couple.

boreal quail
#

I don't know how I would get to that point - despite the screenshot showing simple flat walls, they're actually arbitrary geometry and can be quite complex. It's not possible to cleanly mark a mesh as wall or ceiling, it can easily be both, for example. But I have considered the possibility of iterating over navmesh edges and looking for other nearby edges. Not sure how possible that is - at that point, I do actually have six tidy nav meshes to work with well divided into floor, walls, etc!