Interface PathfindingResult

Result of a pathfinding algorithm run.

Hierarchy

  • PathfindingResult

Properties

closestToTarget?: LayerPosition

Only set, if calculateClosestToTarget is set. It will still be set in algorithms where it does not come with a performance penalty (like BFS). If no path could be found, it contains one position that has the closest distance to the target. The distance is either manhattan distance in case of 4 direction mode or Chebyshev distance in case of 8 direction mode.

Actual shortest path. Contains an empty array if no path has been found.

reachedMaxPathLength: boolean

In case that maxPathLength was set, this property indicates that pathfinding stopped because it reached that maximum path lenght.

steps: number

Generated using TypeDoc