A* Pathfinding Project




How do I get to the center of a node without being affected by PickNextWaypointDist in AIPath?



Do you mean node,Position?
This will give you the position of a node.


It automatically checks the PickNextWaypointDist range and modifies the path when the object moves along the path. I want to get rid of this. I just want to move to the center of the node. I’d appreciate it if you could tell me how.



moving to the exact location of a node should mostly be avoided. An agent almost never truly reaches the exact same position.

You could simply lower the value of Pick Next Waypoint Dist
Though I’d advise against making it 0, instead I’d opt for a value like 0.1f

Hope that helps,

ps. I do have some custom properties here, so your AI path won’t look identical, but similar.



If you want the agent to move precisely along the path you might want to use the AILerp movement script instead. It follows the path without any physics. See https://arongranberg.com/astar/docs/movementscripts.html