diff options
author | Andrea Catania <info@andreacatania.com> | 2020-02-18 17:08:34 +0100 |
---|---|---|
committer | Andrea Catania <info@andreacatania.com> | 2020-02-18 17:12:45 +0100 |
commit | 79fc7d7d6a662efc2a13d829f9bb5d00d31c8c2a (patch) | |
tree | c8bb02beafc149ad9bf1e031461263de94c82fb8 /doc/classes/Navigation.xml | |
parent | 6e6403669377160885cac45db7b8115325c3932f (diff) |
Added utility functions to the new NavigationServer:
- Vector3 get_closest_point_to_segment(const Vector3 &p_from, const Vector3 &p_to, const bool &p_use_collision = false);
- Vector3 get_closest_point(const Vector3 &p_point);
- Vector3 get_closest_point_normal(const Vector3 &p_point);
- Object *get_closest_point_owner(const Vector3 &p_point);
Diffstat (limited to 'doc/classes/Navigation.xml')
-rw-r--r-- | doc/classes/Navigation.xml | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml index d7da753c61..8057aca127 100644 --- a/doc/classes/Navigation.xml +++ b/doc/classes/Navigation.xml @@ -15,7 +15,7 @@ <description> </description> </method> - <method name="get_simple_path"> + <method name="get_simple_path" qualifiers="const"> <return type="PackedVector3Array"> </return> <argument index="0" name="start" type="Vector3"> @@ -28,6 +28,46 @@ 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. </description> </method> + <method name="get_closest_point_to_segment" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="from" type="Vector3"> + </argument> + <argument index="1" name="to" type="Vector3"> + </argument> + <argument index="2" name="use_collision" type="bool" default="false"> + </argument> + <description> + Returns the closest point between the navigation surface and the segment. + </description> + </method> + <method name="get_closest_point" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="point" type="Vector3"> + </argument> + <description> + Returns the point closest to the provided [code]point[/code] on the navigation mesh surface. + </description> + </method> + <method name="get_closest_point_normal" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="point" type="Vector3"> + </argument> + <description> + Returns the normal for the point returned by [method get_closest_point]. + </description> + </method> + <method name="get_closest_point_owner" qualifiers="const"> + <return type="RID"> + </return> + <argument index="0" name="point" type="Vector3"> + </argument> + <description> + Returns the owner region RID for the point returned by [method get_closest_point]. + </description> + </method> </methods> <members> <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3"> |