From 8f9f6f630e5b53b2bf4efee293737739499495b5 Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 1 Apr 2023 18:27:52 +0200 Subject: [PATCH] stop within 10 meters of goal --- Pathfinding/Pathfinder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pathfinding/Pathfinder.cs b/Pathfinding/Pathfinder.cs index 13f2354..dec6866 100644 --- a/Pathfinding/Pathfinder.cs +++ b/Pathfinding/Pathfinder.cs @@ -45,7 +45,7 @@ public class Pathfinder neighbor.currentPathWeight = newPotentialWeight; neighbor.currentPathLength = closestNodeToGoal.currentPathLength + Utils.DistanceBetween(closestNodeToGoal, neighbor); - if (neighbor.Equals(goalNode) || closestNodeToGoal.directDistanceToGoal < 250) + if (neighbor.Equals(goalNode) || closestNodeToGoal.directDistanceToGoal < 10) //change for faster stop = true; else {