Seeker on pointGraph

Hi,

I am using a point graph with several links (NodeLink2) targeting a recast graph. I am using a seeker with only the point graph ticked for its traversal graph (only intended to follow nodes on the point graph) but it appears that the path found is often using nodes from the recast graph. Is this an issue or do I missed to add a constraint ? If I remove all NodeLink2 between both graphes, the seeker is working as expected.

I also tried to tick constrainInsideGraph on the AIPath associated to the seeker (in case this is required in my use case) but I am not getting the expected result : agent seems to be stuck on pointgraph like if path does not provide way to go. I did not debug this case yet, but I will.

Let me know what you think

Many thks
Best

Ive been borking with the pointgraph - Aron actually updated the add/remove nodes function on my request because they are a freaking amazing person.
Anywho, I’ve set a couple of things that have made it so my goblin only goes on the pointgraph;
First - set the Seeker to only use point graph.
Capture

Then, if you only want to query searchable on the graph, this is what I build in to the finding script;
GraphNode node1 = AstarPath.active.data.pointGraph.GetNearest(_leftSide, null, 2.1f).node;
PointNode _pointNode1 = node1 as PointNode;

NOTICE that you can actually assign a specific graph to scan in this, using data.pointgraph instead of the default;
GraphNode node1 = AstarPath.active.GetNearest(this.transform.position, NNConstraint.Walkable).node;
In which is searches ALL graphs.

I sincerely hope this helps - I am running a 2D game where collision occurs but is using pointgraphs to navigate.

Thank you for your feedback.
I have the exact same traversal graph setup, targeting only my point graph like you did.
But querying nodes only on point graph is something I am already doing for other features, but there I am using a seeker with a AIPath component and I am just calling AIPath.SearchPath which should give me a path with only point graph nodes, which it does not.
I know that my links are causing the search to move outside the point graph but by ticking traversal graph of the seeker I was expecting a node filtering. I have noticed that making all gameobjects of my links not active (i.e. setactive(false)) does not change the result of the path. If I delete all gameobjects of my links, the result is then fine (only point graph nodes are returned). So, I will temporally try to add/remove my links on demands i.e. depending on my needs, depending on the feature needed.

Please let me know if there is another solution.

Best

So the Seeker just straight up starts returning paths that are using nodes from the RecastGraph? That’s certainly funky. If you could send me some screenshots of your settings and maybe an overview of your environment I can recreate it on my end and see what I can find :slight_smile:

Hi,

Here are the settings of the seeker + AIPath. Note that AIPathEx is just a subclass of AIPath.

I have those graphes :

image

and links between the point graph “roads” & the recast graph. Links are added like this :

image

where each start point are on the point graph and the ending point on the recast. Note that NodeLink2Ex is just a subclass of NodeLink2

Yesterday I found an issue in my code where the Apply() method was called on link even if its parent container was disabled. As you can see, I was calling ls.Apply() which removes & adds the link even if not active. So, I have added a check like below to avoid the call when go is disabled :

if ( this.gameObject.activeInHierarchy)
ls.Apply();

It fixed one of my issues where links where used even if parent was disabled. This works fine now, but when links are activated, the main issue still remains the fact that path can return node from outside the point graph even if its traversal graph is only ticked to the point graph. I could try to use oneway links but this is not what I need for other features. Right now, as a workaround, I am just activating/deactivating links on the fly depending of my needs.

I hope that helps

Many thks
Best

Yes this helps a lot, I’ll get started on recreating this when I’m next available and will let you know what I find :+1: