Table of Contents

Class NavigationMeshSourceGeometryData2D

Namespace
Godot
Assembly
GodotSharp.dll

Container for parsed source geometry data used in navigation mesh baking.

public class NavigationMeshSourceGeometryData2D : Resource, IDisposable
Inheritance
NavigationMeshSourceGeometryData2D
Implements
Inherited Members

Constructors

NavigationMeshSourceGeometryData2D()

public NavigationMeshSourceGeometryData2D()

Methods

AddObstructionOutline(Vector2[])

Adds the outline points of a shape as obstructed area.

public void AddObstructionOutline(Vector2[] shapeOutline)

Parameters

shapeOutline Vector2[]

AddProjectedObstruction(Vector2[], 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.

public void AddProjectedObstruction(Vector2[] vertices, bool carve)

Parameters

vertices Vector2[]
carve bool

AddTraversableOutline(Vector2[])

Adds the outline points of a shape as traversable area.

public void AddTraversableOutline(Vector2[] shapeOutline)

Parameters

shapeOutline Vector2[]

AppendObstructionOutlines(Array<Vector2[]>)

Appends another array of obstructionOutlines at the end of the existing obstruction outlines array.

public void AppendObstructionOutlines(Array<Vector2[]> obstructionOutlines)

Parameters

obstructionOutlines Array<Vector2[]>

AppendTraversableOutlines(Array<Vector2[]>)

Appends another array of traversableOutlines at the end of the existing traversable outlines array.

public void AppendTraversableOutlines(Array<Vector2[]> traversableOutlines)

Parameters

traversableOutlines Array<Vector2[]>

Clear()

Clears the internal data.

public void Clear()

ClearProjectedObstructions()

Clears all projected obstructions.

public void ClearProjectedObstructions()

GetObstructionOutlines()

Returns all the obstructed area outlines arrays.

public Array<Vector2[]> GetObstructionOutlines()

Returns

Array<Vector2[]>

GetProjectedObstructions()

Returns the projected obstructions as an Array of dictionaries. Each Dictionary contains the following entries:

- vertices - A float[] that defines the outline points of the projected shape.

- carve - A bool that defines how the projected shape affects the navigation mesh baking. If true the projected shape will not be affected by addition offsets, e.g. agent radius.

public Array GetProjectedObstructions()

Returns

Array

GetTraversableOutlines()

Returns all the traversable area outlines arrays.

public Array<Vector2[]> GetTraversableOutlines()

Returns

Array<Vector2[]>

HasData()

Returns true when parsed source geometry data exists.

public bool HasData()

Returns

bool

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

Merge(NavigationMeshSourceGeometryData2D)

Adds the geometry data of another NavigationMeshSourceGeometryData2D to the navigation mesh baking data.

public void Merge(NavigationMeshSourceGeometryData2D otherGeometry)

Parameters

otherGeometry NavigationMeshSourceGeometryData2D

SetObstructionOutlines(Array<Vector2[]>)

Sets all the obstructed area outlines arrays.

public void SetObstructionOutlines(Array<Vector2[]> obstructionOutlines)

Parameters

obstructionOutlines Array<Vector2[]>

SetProjectedObstructions(Array)

Sets the projected obstructions with an Array of Dictionaries with the following key value pairs:

public void SetProjectedObstructions(Array projectedObstructions)

Parameters

projectedObstructions Array

SetTraversableOutlines(Array<Vector2[]>)

Sets all the traversable area outlines arrays.

public void SetTraversableOutlines(Array<Vector2[]> traversableOutlines)

Parameters

traversableOutlines Array<Vector2[]>