Up to date
This page is up to date for Redot 4.3
.
If you still find outdated information, please create an issue.
NavigationMeshSourceGeometryData2DΒΆ
Experimental: This class may be changed or removed in future versions.
Inherits: Resource < RefCounted < Object
Container for parsed source geometry data used in navigation mesh baking.
DescriptionΒΆ
Container for parsed source geometry data used in navigation mesh baking.
MethodsΒΆ
void |
add_obstruction_outline(shape_outline: PackedVector2Array) |
void |
add_projected_obstruction(vertices: PackedVector2Array, carve: bool) |
void |
add_traversable_outline(shape_outline: PackedVector2Array) |
void |
append_obstruction_outlines(obstruction_outlines: Array[PackedVector2Array]) |
void |
append_traversable_outlines(traversable_outlines: Array[PackedVector2Array]) |
void |
clear() |
void |
|
get_obstruction_outlines() const |
|
get_projected_obstructions() const |
|
get_traversable_outlines() const |
|
has_data() |
|
void |
merge(other_geometry: NavigationMeshSourceGeometryData2D) |
void |
set_obstruction_outlines(obstruction_outlines: Array[PackedVector2Array]) |
void |
set_projected_obstructions(projected_obstructions: Array) |
void |
set_traversable_outlines(traversable_outlines: Array[PackedVector2Array]) |
Method DescriptionsΒΆ
void add_obstruction_outline(shape_outline: PackedVector2Array) π
Adds the outline points of a shape as obstructed area.
void add_projected_obstruction(vertices: PackedVector2Array, carve: bool) π
Adds a projected obstruction shape to the source geometry. If carve
is true
the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process.
void add_traversable_outline(shape_outline: PackedVector2Array) π
Adds the outline points of a shape as traversable area.
void append_obstruction_outlines(obstruction_outlines: Array[PackedVector2Array]) π
Appends another array of obstruction_outlines
at the end of the existing obstruction outlines array.
void append_traversable_outlines(traversable_outlines: Array[PackedVector2Array]) π
Appends another array of traversable_outlines
at the end of the existing traversable outlines array.
void clear() π
Clears the internal data.
void clear_projected_obstructions() π
Clears all projected obstructions.
Array[PackedVector2Array] get_obstruction_outlines() const π
Returns all the obstructed area outlines arrays.
Array get_projected_obstructions() const π
Returns the projected obstructions as an Array of dictionaries. Each Dictionary contains the following entries:
vertices
- A PackedFloat32Array that defines the outline points of the projected shape.carve
- A bool that defines how the projected shape affects the navigation mesh baking. Iftrue
the projected shape will not be affected by addition offsets, e.g. agent radius.
Array[PackedVector2Array] get_traversable_outlines() const π
Returns all the traversable area outlines arrays.
Returns true
when parsed source geometry data exists.
void merge(other_geometry: NavigationMeshSourceGeometryData2D) π
Adds the geometry data of another NavigationMeshSourceGeometryData2D to the navigation mesh baking data.
void set_obstruction_outlines(obstruction_outlines: Array[PackedVector2Array]) π
Sets all the obstructed area outlines arrays.
void set_projected_obstructions(projected_obstructions: Array) π
Sets the projected obstructions with an Array of Dictionaries with the following key value pairs:
"vertices" : PackedFloat32Array
"carve" : bool
void set_traversable_outlines(traversable_outlines: Array[PackedVector2Array]) π
Sets all the traversable area outlines arrays.