Influence map

Is there a way to apply some form of influence map to the path finding?

I’ve yet to get my mind around the 5.6 beta, but you can’t do it in 5.5.

It’s possible to access the geometry through the navmesh class, but you would need to build your own navmeshagent and navmesh. It would be a nice feature to have weights per-vertices/nodes instead of perlayer. I can imagine that it would be easy to expose that. ← Feature Request There

1 Like

Are there any tutorials on how to access navmesh data to generate a map for ai use?

It’s really a niche thing, so no, there’re no tutorials. I used the documentation and intellisense: UnityEngine.AI.

1 Like

Like Damon says, and from what I’m seeing, AI in general is niche.
Someone already did what you’re looking for and you can glean some info from reading his twitter x.com. He uses the vertices of a nav mesh to build a vector flow which is the end step of an influence map where you propagate the target. navmesh.NavmeshTriangulation() gives you everything you need. It’s not as easy as arrays because you don’t have the implicit connectedness of a grid but with ā€œindicesā€ you get your connection back at low cost, it’s just that you need to do some preprocessing to get array of the distances between those indices and use the reverse as weight to influence the propagation.
I’d totally share my stuff but at the moment I’m still busy with grids.

1 Like