NavigationPathQueryResult2D

实验性: This class may be changed or removed in future versions.

继承: RefCounted < Object

Represents the result of a 2D pathfinding query.

描述

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

属性

方法

voidreset ( )

枚举

enum PathSegmentType:

PathSegmentType PATH_SEGMENT_TYPE_REGION = 0

This segment of the path goes through a region.

PathSegmentType PATH_SEGMENT_TYPE_LINK = 1

This segment of the path goes through a link.


属性说明

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.

Note: The returned array is copied and any changes to it will not update the original property value. See PackedVector2Array for more details.


PackedInt64Array path_owner_ids = PackedInt64Array()

The ObjectID s of the Object s which manage the regions and links each point of the path goes through.

Note: The returned array is copied and any changes to it will not update the original property value. See PackedInt64Array for more details.


Array RID path_rids = []

The RID s 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.

Note: The returned array is copied and any changes to it will not update the original property value. See PackedInt32Array for more details.


方法说明

void reset ( )

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

1

本方法通常需要用户覆盖才能生效。

2

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。