Click or drag to resize

AStarGetPointConnections Method

Returns an array with the IDs of the points that form the connection with the given point.

var astar = AStar.new()
astar.add_point(1, Vector3(0, 0, 0))
astar.add_point(2, Vector3(0, 1, 0))
astar.add_point(3, Vector3(1, 1, 0))
astar.add_point(4, Vector3(2, 0, 0))

astar.connect_points(1, 2, true)
astar.connect_points(1, 3, true)

var neighbors = astar.get_point_connections(1) # Returns [2, 3]

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public int[] GetPointConnections(
	int id
)

Parameters

id
Type: SystemInt32

[Missing <param name="id"/> documentation for "M:Godot.AStar.GetPointConnections(System.Int32)"]

Return Value

Type: Int32

[Missing <returns> documentation for "M:Godot.AStar.GetPointConnections(System.Int32)"]

See Also