Server for navigation mesh baking and source geometry parsing.
Server for navigation mesh baking and source geometry parsing. [NavigationMesh] baking is the process of creating a simplified mesh used for pathfinding out of (complex) level geometry. For this process, the [NavigationMeshGenerator] parses scene geometry from nodes and uses this information for the creation of the final navigation mesh according to bake parameters. Source geometry parsing and navigation mesh baking are costly operations. It is best to do them infrequently and with the help of background threads at runtime. Source geometry parsing has to finish on the exact frame it was started even when using threads, as the scene tree is not safe to parse when doing updates, and also, by nature, the scene tree itself is not thread-safe. If the amount of geometry that must be parsed is too big, framerate issues may occur. To work around the runtime framerate issues, the source geometry can be parsed to a [NavigationMeshSourceGeometryData2D] or a [NavigationMeshSourceGeometryData3D] resource. This resource can later be (re)used at runtime to bake multiple navigation meshes with different parameters in background threads without touching the scene tree again (assuming the nodes that contribute source geometry have not changed).
$DOCS_URL/tutorials/navigation/navigation_using_navigationmeshes.html
Bakes the provided [param navigation_polygon] with the data from the provided [param source_geometry_data]. After the process is finished the optional [param callback] will be called.
Bakes the provided [param navigation_mesh] with the data from the provided [param source_geometry_data]. After the process is finished the optional [param callback] will be called.
Returns [code]true[/code] if [param navigation_mesh] is currently baking or geometry parsing.
Returns [code]true[/code] if [param navigation_polygon] is currently baking or geometry parsing.
Parses the [SceneTree] (not thread-safe) for source geometry according to the properties of [param navigation_polygon] and returns a [NavigationMeshSourceGeometryData2D] that can be used to bake a navigation mesh. After the process is finished the optional [param callback] will be called.
Parses the [SceneTree] (not thread-safe) for source geometry according to the properties of [param navigation_mesh] and returns a [NavigationMeshSourceGeometryData2D] that can be used to bake a navigation mesh. After the process is finished the optional [param callback] will be called.
Uses both [method parse_2d_source_geometry_data] and [method bake_2d_from_source_geometry_data] in sequence. After the process is finished the optional [param callback] will be called.
Uses both [method parse_3d_source_geometry_data] and [method bake_3d_from_source_geometry_data] in sequence. After the process is finished the optional [param callback] will be called.
Registers a 2d navigation geometry parser to contribute geometry data from parser specified node class(es) for navigation mesh baking.
Registers a 3d navigation geometry parser to contribute geometry data from parser specified node class(es) for navigation mesh baking.
Unregisters the specific 2d navigation geometry parser.
Unregisters the specific 3d navigation geometry parser.