How to select which graph is searched

I have 2 grid graphs.0 & 1

1 is almost the same as 0 but it’s for a massively bigger vehicle so there are many more unwalkable nodes.

When I attempt to create a random path for a large vehicle (code below) it always returns a search through graph 0 even if I specify the graph mask to use. I only ever want the search to be in the graph I specify and never to search all.

What am I doing wrong? How do I force A* to use the graph I select, and only that graph?

Thanks

	RandomPath randomPath = RandomPath.Construct(currentSeeker.transform.position, theGDistanceToMove);

	randomPath.nnConstraint.constrainDistance = false;
	randomPath.nnConstraint.graphMask = 1 << 1; //use graph for big vehicles!

	currentSeeker.StartPath(randomPath, OnPathComplete);

Hi

The Seeker.StartPath method takes an optional graphMask parameter. Since it is optional and the default value is ~0, it will reset that variable if you call the method without the optional param. So just add 1 << 1 as the last parameter to the StartPath call. I know this is a bit unintuitive, I should probably change how this is done at some point in the future.

cheers Aaron. I just found this and was coming back here to post the solution! You got here just before me. :slight_smile: