summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-12-20 11:48:53 +0300
committerYuri Rubinsky <chaosus89@gmail.com>2022-12-20 12:22:32 +0300
commit8c478dcec9abf91491ed952af6244bda5cb15703 (patch)
treeba367b9d8d20583edf1f46bcb63eb5975c9a741a /doc/classes
parentdcb3754db09b7b8c35aae1fedbc485b91e9f9508 (diff)
Restore weight scale for `AStarGrid2D` (partially)
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AStarGrid2D.xml17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/classes/AStarGrid2D.xml b/doc/classes/AStarGrid2D.xml
index bffa395770..916946775b 100644
--- a/doc/classes/AStarGrid2D.xml
+++ b/doc/classes/AStarGrid2D.xml
@@ -69,6 +69,13 @@
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector3Array] and will print an error message.
</description>
</method>
+ <method name="get_point_weight_scale" qualifiers="const">
+ <return type="float" />
+ <param index="0" name="id" type="Vector2i" />
+ <description>
+ Returns the weight scale of the point associated with the given [param id].
+ </description>
+ </method>
<method name="is_dirty" qualifiers="const">
<return type="bool" />
<description>
@@ -106,6 +113,15 @@
[b]Note:[/b] Calling [method update] is not needed after the call of this function.
</description>
</method>
+ <method name="set_point_weight_scale">
+ <return type="void" />
+ <param index="0" name="id" type="Vector2i" />
+ <param index="1" name="weight_scale" type="float" />
+ <description>
+ Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point.
+ [b]Note:[/b] Calling [method update] is not needed after the call of this function.
+ </description>
+ </method>
<method name="update">
<return type="void" />
<description>
@@ -125,6 +141,7 @@
</member>
<member name="jumping_enabled" type="bool" setter="set_jumping_enabled" getter="is_jumping_enabled" default="false">
Enables or disables jumping to skip up the intermediate points and speeds up the searching algorithm.
+ [b]Note:[/b] Currently, toggling it on disables the consideration of weight scaling in pathfinding.
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)">
The offset of the grid which will be applied to calculate the resulting point position returned by [method get_point_path]. If changed, [method update] needs to be called before finding the next path.