A* Pathfinding Project

The character does not move because of the threshold


I turn on / off CanSearch for npc characters.
When the npc character is in the low position, we turn on CanSearch and execute the SearchPath () function, but the npc character is still in place.

How do I get a character in my lower jaw to find my way?



I would recommend checking the value of the ‘end reached distance’ field. Try to decrease that a bit. Or you could set the ‘When Close To Destination’ field to ‘ContinueToExactDestination’.



I carried out your advice.
However, npc did not solve the problem that did not go forward.
I set CanSearch to false until I entered the building.
Set CanSearch to True only when Npc arrives at the waypoint and points to the next point.

Use Vector3.SqrManitude to set CanSearch to True when the values of the previous and current coordinates are less than or equal to 2 in Math.ABS, execute the SearchPath function, and set it to false.

Vector3.SqrManitude checks are performed once every 10 seconds.


Note that if you call SearchPath manually, you do not have to set canSearch to true. That is only for the automatic path recalculations.

As you can see the green line, the path has been calculated correctly. I’m not sure what could be causing it not to move if you followed the tips in my previous post.