Suppose I have a large ocean in my map, that I don’t want Agents to walk on - should I really use multiple of the Obstacles objects to create a barricade around it? Or is there more of an elegant solution?
Use a big NavigationArea
(which is just a box) and set it’s Area ID to be > 64, that will mark it as an unwalkable area.
Also curious from a programming stand point why the Obstacles are septagons, instead of something like a simple cube
They’re analytic cylinders, the actual shape in the navmesh will vary between a square, pentagon, hexagon, septagon, octagon, etc based on navmesh voxel resolution.
It’s basically because of RVO (used by Crowd Navigation), authorial ease (sphere’s suck), Nyquist frequency, execution simplicity of having all obstacles use the same shape type, and probably other things I don’t know about. You’d have to ask Mikko himself (the author of Recast/Detour) for a more in-depth answer.
When I wrote the debug drawing for crowd agents and obstacles I just went with octagon’s for no specific reason. Just a convenient low vertex count shape that got the idea across.