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'''...") |
m (Added "issues" category) |
||
Line 22: | Line 22: | ||
<!-- TODO: Write an example | <!-- TODO: Write an example | ||
--> | --> | ||
==Issues== | |||
{| class="wikitable" | |||
|- | |||
! Issue ID !! Description | |||
|- | |||
| [https://github.com/eXo-OpenSource/ml_pathfind/issues/8 8] || Providing callback function to findShortestPathBetween crashes the server | |||
|} | |||
==See Also== | ==See Also== | ||
===Functions=== | ===Functions=== | ||
{{Modules/Pathfinding/Functions}} | {{Modules/Pathfinding/Functions}} |
Latest revision as of 18:21, 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.
Example
Issues
Issue ID | Description |
---|---|
8 | Providing callback function to findShortestPathBetween crashes the server |