Hi
I need some advice. I need to have two different grid graphs, with different agent radius on them (this is the only difference), they will overlap each other and will be very similar. I also got a pro version.
How it should be done right?
There is actually a feature for explicitly stating which graphs to search.
You can set an optional parameter on the StartPath call to a bitmask with the graphs that you want to search on as set bits.
ABPath p = ABPath.Construct (transform.position, blah, null);
seeker.StartPath(p, OnPathComplete, 1 << 0);
The above code will ensure that only the first graph is searched (read up on bitmasks if you have no idea what “1 << 0” does).
See http://arongranberg.com/astar/docs/class_seeker.php#ab50a876ab529ceb3eb9b97deb5a48d1e
1 Like