Optional
calculateIf true
, PathfindingResult.closestToTarget is calculated.
Otherwise it is ignored in some algorithms and will not be set in PathfindingResult.
Depending on the used pathfinding algorithm (like for BIDIRECTIONAL_SEARCH)
it can be faster if it is disabled. It will not be ignored in algorithms
where it does not come with a performance penalty (like BFS).
true
Optional
collisionThe collision groups to consider for pathfinding.
Optional
considerOnly considered by A* algorithm.
If set to true
, pathfinding will consider costs. Costs are set via tile
properties.
false
Optional
ignoreIf set to true
, pathfinding will find a path, even if the target is
blocked. This is a common use case if you want to find the shortest path
to a blocking character.
Optional
ignoreIf set to true
, pathfinding will only be performed on the char layer of
the start position. If you don't use char layers, activating this setting
can improve pathfinding performance.
false
Optional
ignoreIf set to true
, map boundaries are ignored. By default, positions
outside of the boundaries of the tilemap are considered to be blocking,
even if PathfindingOptions.ignoreTiles is set to false
.
Optional
ignoreIf set to true
, tile collisions will be ignored.
Optional
ignoredSet of characters to ignore at collision checking.
Optional
isFunction to specify whether a certain position is allowed for pathfinding. If the function returns false, the tile will be consindered as blocked.
It can be used to restrict pathfinding to specific regions.
Beware that this method can become a performance bottleneck easily. So be careful and keep it as efficient as possible. An asymptotic runtime complexity of O(1) is recommended.
Optional
maxIf this is set, the algorithm will stop once it reaches a path length of this value. This is useful to avoid running out of memory on large or infinite maps.
Optional
numberThe number of directions to consider.
Optional
pathConsecutive tiles in y-dimension that need to fit in the path. This is useful for characters that span over multiple tiles.
Optional
pathConsecutive tiles in x-dimension that need to fit in the path. This is useful for characters that span over multiple tiles.
Optional
shortestAlgorithm used for Pathfinding.
Configuration object for pathfinding.