Class NavigationMeshSourceGeometryData2D
Container for parsed source geometry data used in navigation mesh baking.
- Inheritance
-
NavigationMeshSourceGeometryData2D
Remarks
Container for parsed source geometry data used in navigation mesh baking.
Methods
add_obstruction_outline(PackedVector2Array)
Adds the outline points of a shape as obstructed area.
void add_obstruction_outline(PackedVector2Array shape_outline)
Parameters
shape_outline
PackedVector2Array
add_projected_obstruction(PackedVector2Array, 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_projected_obstruction(PackedVector2Array vertices, bool carve)
Parameters
vertices
PackedVector2Arraycarve
bool
add_traversable_outline(PackedVector2Array)
Adds the outline points of a shape as traversable area.
void add_traversable_outline(PackedVector2Array shape_outline)
Parameters
shape_outline
PackedVector2Array
append_obstruction_outlines(PackedVector2Array[])
Appends another array of obstruction_outlines
at the end of the existing obstruction outlines array.
void append_obstruction_outlines(PackedVector2Array[] obstruction_outlines)
Parameters
obstruction_outlines
PackedVector2Array[]
append_traversable_outlines(PackedVector2Array[])
Appends another array of traversable_outlines
at the end of the existing traversable outlines array.
void append_traversable_outlines(PackedVector2Array[] traversable_outlines)
Parameters
traversable_outlines
PackedVector2Array[]
clear
Clears the internal data.
void clear
clear_projected_obstructions
Clears all projected obstructions.
void clear_projected_obstructions
get_bounds
Returns an axis-aligned bounding box that covers all the stored geometry data. The bounds are calculated when calling this function with the result cached until further geometry changes are made.
Rect2 get_bounds
get_obstruction_outlines
Qualifiers: const
Returns all the obstructed area outlines arrays.
PackedVector2Array[] get_obstruction_outlines
get_projected_obstructions
Qualifiers: 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 get_projected_obstructions
get_traversable_outlines
Qualifiers: const
Returns all the traversable area outlines arrays.
PackedVector2Array[] get_traversable_outlines
has_data
Returns true
when parsed source geometry data exists.
bool has_data
merge(NavigationMeshSourceGeometryData2D)
Adds the geometry data of another NavigationMeshSourceGeometryData2D to the navigation mesh baking data.
void merge(NavigationMeshSourceGeometryData2D other_geometry)
Parameters
other_geometry
NavigationMeshSourceGeometryData2D
set_obstruction_outlines(PackedVector2Array[])
Sets all the obstructed area outlines arrays.
void set_obstruction_outlines(PackedVector2Array[] obstruction_outlines)
Parameters
obstruction_outlines
PackedVector2Array[]
set_projected_obstructions(Array)
Sets the projected obstructions with an Array of Dictionaries with the following key value pairs:
"vertices" : PackedFloat32Array
"carve" : bool
void set_projected_obstructions(Array projected_obstructions)
Parameters
projected_obstructions
Array
set_traversable_outlines(PackedVector2Array[])
Sets all the traversable area outlines arrays.
void set_traversable_outlines(PackedVector2Array[] traversable_outlines)
Parameters
traversable_outlines
PackedVector2Array[]