To recap, I am using marching cubes to create a spherical world, and AIAlignWithSurface to attach to the graph after scan. I’ve already found:
- Do not instantiate AI’s directly on the surface, they will fall through / off the planet.
- Funnel modifier has to be on Medium, LineCast is used on High quality Funnel and errors on mountainous spherical navmeshes
- No navmesh cutting.
So how am I going to actually get some of the planet features into the pathfinding? My AI’s are going directly through trees and rocks, and right into the ponds where they get stuck for some reason (downhill into the pond, uphill too steep? Who knows).
I have two ideas. One is to attach an RVO controller to all planet features and let the RVO simulator attempt to handle it. I would like to get a sense of this being performant or not if I have roughly 500 objects per planet that the agents should not be able to pass through.
Next, during proc gen, I create a second planet that has the triangles from the instantiation positions of these objects and areas that should be impassable removed. This would hopefully leave holes in the navmesh and A* would simply do its thing. Perhaps combined with RVO’s on objects that are larger than a triangle on the mesh (Large objects, etc.) this can be used. Advantage here is that different units can use different graphs (I could have a graph that is water creatures only by doing the reverse of above, or air units that stay the same height as they pass from land to water, even though the ground mesh is dipping down).
Or, am I completely missing a feature of A* to do this properly?