0.2.0-dev Download ZIP
45 lines ·2.3 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="NavigationPathQueryResult2D" inherits="RefCounted" api_type="core" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Represents the result of a 2D pathfinding query. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | This class stores the result of a 2D navigation path query from the [NavigationServer2D]. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | <link title="Using NavigationPathQueryObjects">$DOCS_URL/tutorials/navigation/navigation_using_navigationpathqueryobjects.html</link> |
| 11 | </tutorials> |
| 12 | <methods> |
| 13 | <method name="reset"> |
| 14 | <return type="void" /> |
| 15 | <description> |
| 16 | Reset the result object to its initial state. This is useful to reuse the object across multiple queries. |
| 17 | </description> |
| 18 | </method> |
| 19 | </methods> |
| 20 | <members> |
| 21 | <member name="path" type="PackedVector2Array" setter="set_path" getter="get_path" default="PackedVector2Array()"> |
| 22 | 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 [method NavigationServer2D.map_get_path]. |
| 23 | </member> |
| 24 | <member name="path_length" type="float" setter="set_path_length" getter="get_path_length" default="0.0"> |
| 25 | Returns the length of the path. |
| 26 | </member> |
| 27 | <member name="path_owner_ids" type="PackedInt64Array" setter="set_path_owner_ids" getter="get_path_owner_ids" default="PackedInt64Array()"> |
| 28 | The [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through. |
| 29 | </member> |
| 30 | <member name="path_rids" type="RID[]" setter="set_path_rids" getter="get_path_rids" default="[]"> |
| 31 | The [RID]s of the regions and links that each point of the path goes through. |
| 32 | </member> |
| 33 | <member name="path_types" type="PackedInt32Array" setter="set_path_types" getter="get_path_types" default="PackedInt32Array()"> |
| 34 | The type of navigation primitive (region or link) that each point of the path goes through. |
| 35 | </member> |
| 36 | </members> |
| 37 | <constants> |
| 38 | <constant name="PATH_SEGMENT_TYPE_REGION" value="0" enum="PathSegmentType"> |
| 39 | This segment of the path goes through a region. |
| 40 | </constant> |
| 41 | <constant name="PATH_SEGMENT_TYPE_LINK" value="1" enum="PathSegmentType"> |
| 42 | This segment of the path goes through a link. |
| 43 | </constant> |
| 44 | </constants> |
| 45 | </class> |