NavigationPathQueryResult2D
Inherits: RefCounted < Object
Description
Section titled “Description”Represents the result of a 2D pathfinding query.
This class stores the result of a 2D navigation path query from the NavigationSystem2D.
Properties
Section titled “Properties”| Type | Name | Default |
|---|---|---|
| PackedVector2Array | path |
PackedVector2Array() |
| float | path_length |
0.0 |
| PackedInt64Array | path_owner_ids |
PackedInt64Array() |
| Array[RID] | path_rids |
[] |
| PackedInt32Array | path_types |
PackedInt32Array() |
Methods
Section titled “Methods”| Returns | Method |
|---|---|
| void | reset() |
Enumerations
Section titled “Enumerations”PathSegmentType
enum PathSegmentType
PATH_SEGMENT_TYPE_REGION = 0
This segment of the path goes through a region.
PATH_SEGMENT_TYPE_LINK = 1
This segment of the path goes through a link.
Property descriptions
Section titled “Property descriptions”path
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 NavigationSystem2D.map_get_path().
path_length
float path_length = 0.0
Returns the length of the path.
path_owner_ids
PackedInt64Array path_owner_ids = PackedInt64Array()
The ObjectIDs of the Objects which manage the regions and links each point of the path goes through.
path_rids
The RIDs of the regions and links that each point of the path goes through.
path_types
PackedInt32Array path_types = PackedInt32Array()
The type of navigation primitive (region or link) that each point of the path goes through.
Method descriptions
Section titled “Method descriptions”reset
void reset()
Reset the result object to its initial state. This is useful to reuse the object across multiple queries.
