Hello, I am considering buying the package, but I have a question:
Is it possible to define a custom shape that the navmesh area will be confined to? I am asking this because my use case is the following:
- I have a large terrain- height variation etc.
- I have a spline which defines the “playable area”.
I do not want anything to be able to pathfind outside of this area, so I would want to bake the navmesh to be ON the terrain, but only in places inside of the spline/shape.
The only two ways I can think to do this would be to either use a NavMesh or Point graph.
For the NavMesh graph, as the name implies you would need to create a mesh that mimics the walkable area. But this isn’t automatic and would need to be created in some 3rd party application or a script you’d need to write to create one based on your splines.
The other being the Point graph. You’d have to place individual points where agents can walk. Placing manually or again writing some script to place them automatically. But point graphs aren’t very fast for pathfinding and based on the docs, are pretty limiting in where agents can walk as they define points and not a walkable area.
There are ways to get this effect without confining the navmesh to a specific area. You can mark everything outside of it “unwalkable” with tags or even have your units filter if the area is within the spline (not built-in, you’d have to get “isInsideSpline” on your own) and then use that to dictate if agents can pathfind to it. TLDR There’s a lot of options here.
I think the most important question is what’s your reasoning? Performance or just cleanliness? Something else entirely?