summaryrefslogtreecommitdiffstats
path: root/doc/classes/NavigationServer2D.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/NavigationServer2D.xml')
-rw-r--r--doc/classes/NavigationServer2D.xml28
1 files changed, 27 insertions, 1 deletions
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index 91d69edf29..a0d03d7a01 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -14,8 +14,8 @@
This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
</description>
<tutorials>
- <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link>
<link title="Using NavigationServer">$DOCS_URL/tutorials/navigation/navigation_using_navigationservers.html</link>
+ <link title="Navigation Polygon 2D Demo">https://godotengine.org/asset-library/asset/2722</link>
</tutorials>
<methods>
<method name="agent_create">
@@ -947,6 +947,32 @@
If [code]true[/code] enables debug mode on the NavigationServer.
</description>
</method>
+ <method name="simplify_path">
+ <return type="PackedVector2Array" />
+ <param index="0" name="path" type="PackedVector2Array" />
+ <param index="1" name="epsilon" type="float" />
+ <description>
+ Returns a simplified version of [param path] with less critical path points removed. The simplification amount is in worlds units and controlled by [param epsilon]. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation.
+ Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields".
+ </description>
+ </method>
+ <method name="source_geometry_parser_create">
+ <return type="RID" />
+ <description>
+ Creates a new source geometry parser. If a [Callable] is set for the parser with [method source_geometry_parser_set_callback] the callback will be called for every single node that gets parsed whenever [method parse_source_geometry_data] is used.
+ </description>
+ </method>
+ <method name="source_geometry_parser_set_callback">
+ <return type="void" />
+ <param index="0" name="parser" type="RID" />
+ <param index="1" name="callback" type="Callable" />
+ <description>
+ Sets the [param callback] [Callable] for the specific source geometry [param parser]. The [Callable] will receive a call with the following parameters:
+ - [code]navigation_mesh[/code] - The [NavigationPolygon] reference used to define the parse settings. Do NOT edit or add directly to the navigation mesh.
+ - [code]source_geometry_data[/code] - The [NavigationMeshSourceGeometryData2D] reference. Add custom source geometry for navigation mesh baking to this object.
+ - [code]node[/code] - The [Node] that is parsed.
+ </description>
+ </method>
</methods>
<signals>
<signal name="map_changed">