Class reference

NavigationPathQueryResult2D

Inherits RefCounted

Experimental.

Represents the result of a 2D pathfinding query.

Description

This class stores the result of a 2D navigation path query from the NavigationServer2D.

Properties

PackedVector2Array path = PackedVector2Array()

The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by NavigationServer2D.map_get_path().

float path_length = 0.0

Returns the length of the path.

PackedInt64Array path_owner_ids = PackedInt64Array()

The ObjectIDs of the Objects which manage the regions and links each point of the path goes through.

RID[] path_rids = []

The RIDs of the regions and links that each point of the path goes through.

PackedInt32Array path_types = PackedInt32Array()

The type of navigation primitive (region or link) that each point of the path goes through.

Methods

void reset()

Reset the result object to its initial state. This is useful to reuse the object across multiple queries.

Constants

PATH_SEGMENT_TYPE_REGION = 0

Enum: PathSegmentType

This segment of the path goes through a region.

Enum: PathSegmentType

This segment of the path goes through a link.

Tutorials

Source revision 4f5b14abade2
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.