Find a path from multiple graphs combined

I have the following 3 recast graphs:

  1. Terrain mesh
  2. A custom set of meshes representing terrain types (with tags)
  3. Another set of meshes representing high penalty areas (with tags too)

The 3 graphs overlap, so some points on the terrain have a combination of tags. For example, a point could be of terrain type “Forest” and also inside a “High penalty” area.

Is there a way for an agent to take all 3 graphs into consideration when calculating a path? For example, an agent should prefer going through a forest (penalty 50) rather than through open plains (penalty 0) within a high penalty area (penalty 1000).

Hi

This is not possible. Different graphs are completely separate, and do not share information when they overlap.
You can however use a custom ITraversalProvider to set completely custom rules for traversal.
See Agent-Specific Pathfinding - A* Pathfinding Project