sm.pathfinder
Path finder.
Functions
getPath
sm.pathfinder.getPath( character, destination, groundPos, linkConditions )
Server-Only
Finds a path.
Arguments:character
[ Character ]: The character to find a path for.destination
[ Vec3 ]: The path destination.groundPos
[ bool ]: Whether the destination is ground level or not. Defaults to true.linkConditions
[ table ]: A table of link conditions. Optional.
- [ table ]: The found path, as a table of pathNodes.
getSortedNodes
sm.pathfinder.getSortedNodes( worldPosition, minDist, maxDist )
Server-Only
Finds all nearby path nodes.
Arguments:worldPosition
[ Vec3 ]: The position to check.minDist
[ number ]: The minimum distance around the position.maxDist
[ number ]: The maximum distance around the position.
- [ table ]: A table of found pathNodes, sorted closest to farthest.