Getting wierd movement when the AI tries to pass through links between graphs

Click to see the animation.

There a navmesh graph on the left and a point graph on the right, which are linked with 4 link pair.
The Start has an AIPath attached.
The Target is assigned to the target of the Seeker component of the Start.

Using 3.6 free version.

Any one here? Any idea?

OK, I know it’s not a good practice just now.

Maybe I should give up and try another pathfinding plugin or write one myself.

Hi

The reason is that your AI repeatedly recalculates the path while moving. However when the AI is between two graphs, it will find the correct node, but that might be far away from it (if it has moved some distance from the graph), so it will turn back first and then continue following the rest of the path.
You could either

  • Only recalculate the path when needed (i.e on user request such as clicking).
  • or disable path recalculation when the AI is moving on an edge between the two graphs (which might be a bit tricky to detect though).

Yes, exactly.
It works when I uncheck canSearch of AIPath at the proper moment.

1 Like