Pathfinder tweaks (#12848)
This commit is contained in:
@@ -82,10 +82,11 @@ public sealed partial class PathfindingSystem
|
||||
// Actual pathfinding here
|
||||
(_, currentNode) = request.Frontier.Take();
|
||||
|
||||
// TODO: Need this at some stage but need to fix some steering bugs first before it's useable.
|
||||
if (currentNode.Equals(endNode))// ||
|
||||
//(endNode.GraphUid == currentNode.GraphUid &&
|
||||
//(endNode.Box.Center - currentNode.Box.Center).Length < request.Range))
|
||||
// If we're inside the required distance OR we're at the end node.
|
||||
if ((request.Distance > 0f &&
|
||||
currentNode.Coordinates.TryDistance(EntityManager, request.End, out var distance) &&
|
||||
distance <= request.Distance) ||
|
||||
currentNode.Equals(endNode))
|
||||
{
|
||||
arrived = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user