Optional
algorithmOptional
alternativeOnly relevant if MoveToConfig.noPathFoundStrategy is set to NoPathFoundStrategy.ALTERNATIVE_TARGETS.
It provides a list of alternative targets that are considered if the main target is not reachable. That list is processed in order.
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 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
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
noOnly relevant if MoveToConfig.noPathFoundStrategy is set to NoPathFoundStrategy.ALTERNATIVE_TARGETS.
In case all these targets are blocked this is the fallback strategy.
Optional
noOnly relevant if noPathFoundStrategy is set to NoPathFoundStrategy.RETRY.
It sets the maximum amount of retries before giving up.
Optional
noOnly relevant if noPathFoundStrategy is set to NoPathFoundStrategy.RETRY.
It sets the time in milliseconds that the pathfinding algorithm will wait until the next retry.
Optional
noDetermines what happens if no path could be found. For the different strategies see NoPathFoundStrategy.
Optional
pathOnly relevant if MoveToConfig.pathBlockedStrategy is set to PathBlockedStrategy.RETRY.
It sets the maximum amount of retries before giving up.
Optional
pathOnly relevant if MoveToConfig.pathBlockedStrategy is set to PathBlockedStrategy.RETRY.
It sets the time in milliseconds that the pathfinding algorithm will wait until the next retry.
Optional
pathDetermines what happens if a previously calculated path is suddenly blocked. This can happen if a path existed and while the character was moving along that path, it got suddenly blocked.
For the different strategies see PathBlockedStrategy.
Optional
pathOnly relevant if MoveToConfig.pathBlockedStrategy is set to PathBlockedStrategy.WAIT.
It sets the number of milliseconds that the pathfinding algorithm will wait for the path to become unblocked again before stopping the movement.
Optional
targetChar layer of the movement target. If there is no targetLayer
provided,
the current char layer of the moving character is used.
Algorithm to use for pathfinding.