How to make seeker seek on multiple graphs?

So I have a standard GridGraph for my terrain, and I have a PointGraph (actually a derived version of it that allows me to remove dead nodes, but a PointGraph in every other way) that I use for player placed roads.

I want to make my agents favor the PointGraph over the GridGraph, but from what I can tell the seeker doesn’t seem “aware” of this other graph. My agents are still using the GridGraph underneath the road (PointGraph), even if I make a straight line with the PointGraph that would be a faster way to get to the destination.

I am wondering though what the procedure is for using multiple graphs like this. I couldn’t; find anything in the documentation that addresses this (could have missed it though).


Generally this approach will lead to a very brittle pathfinding setup. For example moving diagonally across a road might not give you the desired path. Instead I would recommend that you use penalties on the grid graph to make it prefer the roads. If you have the pro version, the easiest way is to paint a penalty texture. Check the ‘Grid Graph Settings -> Penalty Modifications -> Use Texture’ section. The way you want to set it up is that you want to increase the penalty on all nodes that are not on the road. The A* algorithm does not handle negative penalties, so you increase the penalty on everything else instead. Here is the documentation:

The color data is read as 0…255 values and a total penalty of 1000 corresponds roughly to the cost of moving 1 world unit.

The problem with this suggestion is that my roads are not placed by a level designer, they are placed by the player during runtime. In addition, the roads are not straight lines (but can be), they are based on bezier splines, and have multiple lanes. On top iof that, these levels are all generated at random via a seed.

If I use penalties on a grpdgraph, they are going to move unnaturally and outside of the lanes I set up with a pointgraph.

I am ok with the AI not picking the optimal path, I just need them to understand that there is a pointgraph (with much lower penalty) as well as a gridgraph that they can make use of. Is there a way to make the seeker seek a path on a particular graph? Or a two step process alogn the lines of “seek a path to the closest pointgraph node, and then seek a path to position X on the pointgraph”?