|
4 | 4 | Mesh-based navigation and pathfinding node. |
5 | 5 | </brief_description> |
6 | 6 | <description> |
7 | | - Provides navigation and pathfinding within a collection of [NavigationMesh]es. By default, these will be automatically collected from child [NavigationMeshInstance] nodes, but they can also be added on the fly with [method navmesh_add]. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. |
8 | | - [b]Note:[/b] The current navigation system has many known issues and will not always return optimal paths as expected. These issues will be fixed in Godot 4.0. |
| 7 | + Provides navigation and pathfinding within a collection of [NavigationMesh]es. By default, these will be automatically collected from child [NavigationMeshInstance] nodes. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. |
9 | 8 | </description> |
10 | 9 | <tutorials> |
11 | 10 | <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link> |
12 | 11 | </tutorials> |
13 | 12 | <methods> |
14 | | - <method name="get_closest_point"> |
| 13 | + <method name="get_closest_point" qualifiers="const"> |
15 | 14 | <return type="Vector3" /> |
16 | 15 | <argument index="0" name="to_point" type="Vector3" /> |
17 | 16 | <description> |
18 | 17 | Returns the navigation point closest to the point given. Points are in local coordinate space. |
19 | 18 | </description> |
20 | 19 | </method> |
21 | | - <method name="get_closest_point_normal"> |
| 20 | + <method name="get_closest_point_normal" qualifiers="const"> |
22 | 21 | <return type="Vector3" /> |
23 | 22 | <argument index="0" name="to_point" type="Vector3" /> |
24 | 23 | <description> |
25 | 24 | Returns the surface normal at the navigation point closest to the point given. Useful for rotating a navigation agent according to the navigation mesh it moves on. |
26 | 25 | </description> |
27 | 26 | </method> |
28 | | - <method name="get_closest_point_owner"> |
29 | | - <return type="Object" /> |
| 27 | + <method name="get_closest_point_owner" qualifiers="const"> |
| 28 | + <return type="RID" /> |
30 | 29 | <argument index="0" name="to_point" type="Vector3" /> |
31 | 30 | <description> |
32 | | - Returns the owner of the [NavigationMesh] which contains the navigation point closest to the point given. This is usually a [NavigationMeshInstance]. For meshes added via [method navmesh_add], returns the owner that was given (or [code]null[/code] if the [code]owner[/code] parameter was omitted). |
| 31 | + Returns the owner of the [NavigationMesh] which contains the navigation point closest to the point given. This is usually a [NavigationMeshInstance]. |
33 | 32 | </description> |
34 | 33 | </method> |
35 | | - <method name="get_closest_point_to_segment"> |
| 34 | + <method name="get_closest_point_to_segment" qualifiers="const"> |
36 | 35 | <return type="Vector3" /> |
37 | 36 | <argument index="0" name="start" type="Vector3" /> |
38 | 37 | <argument index="1" name="end" type="Vector3" /> |
|
41 | 40 | Returns the navigation point closest to the given line segment. When enabling [code]use_collision[/code], only considers intersection points between segment and navigation meshes. If multiple intersection points are found, the one closest to the segment start point is returned. |
42 | 41 | </description> |
43 | 42 | </method> |
44 | | - <method name="get_simple_path"> |
| 43 | + <method name="get_rid" qualifiers="const"> |
| 44 | + <return type="RID" /> |
| 45 | + <description> |
| 46 | + Returns the object's [RID]. |
| 47 | + </description> |
| 48 | + </method> |
| 49 | + <method name="get_simple_path" qualifiers="const"> |
45 | 50 | <return type="PoolVector3Array" /> |
46 | 51 | <argument index="0" name="start" type="Vector3" /> |
47 | 52 | <argument index="1" name="end" type="Vector3" /> |
48 | 53 | <argument index="2" name="optimize" type="bool" default="true" /> |
49 | 54 | <description> |
50 | 55 | Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored. |
51 | | - [b]Note:[/b] This method has known issues and will often return non-optimal paths. These issues will be fixed in Godot 4.0. |
52 | | - </description> |
53 | | - </method> |
54 | | - <method name="navmesh_add"> |
55 | | - <return type="int" /> |
56 | | - <argument index="0" name="mesh" type="NavigationMesh" /> |
57 | | - <argument index="1" name="xform" type="Transform" /> |
58 | | - <argument index="2" name="owner" type="Object" default="null" /> |
59 | | - <description> |
60 | | - Adds a [NavigationMesh]. Returns an ID for use with [method navmesh_remove] or [method navmesh_set_transform]. If given, a [Transform2D] is applied to the polygon. The optional [code]owner[/code] is used as return value for [method get_closest_point_owner]. |
61 | | - </description> |
62 | | - </method> |
63 | | - <method name="navmesh_remove"> |
64 | | - <return type="void" /> |
65 | | - <argument index="0" name="id" type="int" /> |
66 | | - <description> |
67 | | - Removes the [NavigationMesh] with the given ID. |
68 | | - </description> |
69 | | - </method> |
70 | | - <method name="navmesh_set_transform"> |
71 | | - <return type="void" /> |
72 | | - <argument index="0" name="id" type="int" /> |
73 | | - <argument index="1" name="xform" type="Transform" /> |
74 | | - <description> |
75 | | - Sets the transform applied to the [NavigationMesh] with the given ID. |
76 | 56 | </description> |
77 | 57 | </method> |
78 | 58 | </methods> |
79 | 59 | <members> |
| 60 | + <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3"> |
| 61 | + The XZ plane cell size to use for fields. |
| 62 | + </member> |
| 63 | + <member name="edge_connection_margin" type="float" setter="set_edge_connection_margin" getter="get_edge_connection_margin" default="5.0"> |
| 64 | + This value is used to detect the near edges to connect compatible regions. |
| 65 | + </member> |
80 | 66 | <member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector" default="Vector3( 0, 1, 0 )"> |
81 | 67 | Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction. |
82 | 68 | </member> |
|
0 commit comments