Modules/Pathfinding/findShortestPathBetween: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<pageclass class="#AA7592" subcaption="Pathfinding Module"></pageclass> __NOTOC__ {{ModuleFunction|Pathfinding}} This function finds the shortest path between 2 points in the world. ==Syntax== <syntaxhighlight lang="c++"> bool findShortestPathBetween(int graphId, float startX, float startY, float startZ, float endX, float endY, float endZ, function callback) </syntaxhighlight> ===Required arguments=== * '''graphId:''' The id of the graph * '''startX, startY, startZ'''...") |
(No difference)
|
Revision as of 17:48, 3 February 2022
![]() |
This function is provided by the external module Pathfinding. You must install this module to use this function. |
This function finds the shortest path between 2 points in the world.
Syntax
bool findShortestPathBetween(int graphId, float startX, float startY, float startZ, float endX, float endY, float endZ, function callback)
Required arguments
- graphId: The id of the graph
- startX, startY, startZ: The start position
- endX, endY, endZ: The end position
- callback: The callback function (parameters: table nodes)
Returns
Returns true if the route calculation has been scheduled successfully, false otherwise.