sm.pathfinder
Pathfinder
Constants:
Functions:
sm.pathfinder.conditionProperty
Condition link types
height |
target |
none |
sm.pathfinder.getPath(character, destination, groundPos=true, linkConditions=nil)
Server only
Find a path
Parameters:
Type | Name | Description |
---|---|---|
Character | character | The character to find path for |
Vec3 | destination | The path destination |
boolean | groundPos=true | If the destination is ground level |
table | linkConditions=nil | Table of link conditions |
Returns:
Type | Description |
---|---|
table | The path as table of PathNodes |
sm.pathfinder.getSortedNodes(worldPosition, minDist, maxDist)
Server only
Find all nearby path nodes
Parameters:
Type | Name | Description |
---|---|---|
Vec3 | worldPosition | The position to look in |
number | minDist | Minimum distance around pos |
number | maxDist | Maximum distance around pos |
Returns:
Type | Description |
---|---|
table | Table of PathNodes sorted closest to farthest |