diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-06-09 10:26:21 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-06-09 11:04:12 +0200 |
commit | 187ba4c5a884aaecd97febcdfaaa76466820be07 (patch) | |
tree | cfd4c790aea0f3b7cd3ec3fe90f48bbe1345aa42 /doc/classes/AStar2D.xml | |
parent | 201d5a7fc53c041e011ad7a79b805f5989216d28 (diff) |
AStar: Make get_closest_point() deterministic for equidistant points
Closes godotengine/godot-docs#3667.
Supersedes #39405.
Diffstat (limited to 'doc/classes/AStar2D.xml')
-rw-r--r-- | doc/classes/AStar2D.xml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 16fa05041e..622d336ef6 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -114,7 +114,8 @@ <argument index="1" name="include_disabled" type="bool" default="false"> </argument> <description> - Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns -1 if there are no points in the points pool. + Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool. + [b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result. </description> </method> <method name="get_closest_position_in_segment" qualifiers="const"> |