Point Graph Issues

Hello,

My seeker agents sometimes fail to find a path on the graphs I’m generating.

I’m generating a procedural world, totally random everytime. I generate 2 Point Graph at runtime - one for the World Map, and another one for the area that the character is moving. Both of these graphs coexist in the same space, and the smaller one overlaps the first one.

So this is kind of difficult to explain due to the nature of the game, but here I go:

There are 2 cameras - World Map and Overworld.
There are 2 graphs - WorldMap graph, and Overworld graph. They overlap, the second one being way smaller for higher res pathfinding in specific play location.

If I generate the graph close to the center, the agents have no issue finding the path. If I get the agent too far from the center, then the seeker is not able to find paths anymore. It’s like whenever the agent gets too far away from 0,0,0, it loses track of the graph as it didn’t exist.

Anytime the camera moves, I am updating the graph to match the new terrain. I only change the graph node’s positions. I don’t touch the connections. The nodes are always right underneath the character moving, so it’s really close.

Why would the agents be losing track of the generated graph if they are too far away from the center? Pathfinding is drawing the nodes and their connections correctly where they should be. So Pathfinder can see the graphs, but the agents seem to lose track of it. Maybe they can’t find a near node to start the path? The graph is being drawn right next to them though.

pd: Also, when I use “ABPath.Construct(a, b, callback)”, is there any way to tell the system to limit the path to a specific graph? Since I’m using multiple graphs, I just need one or the other to work at any given time. Seeker can change the graph masks. Anything similar when building a path?

Hi

How far is far away?
Also. If you are moving the nodes, you cannot set the individual node positions, as the point graph has a lookup cache that will get invalidated then. Instead, I recommend that you use `pointGraph.RelocateNodes(matrix)`.

Sure. You can set `path.nnConstraint.graphMask`.