Merge pull request #57013 from Killfrra/3.x
[3.x] Backport method `get_rid` for NavigationAgent
This commit is contained in:
commit
40a348bce2
4 changed files with 16 additions and 0 deletions
|
@ -45,6 +45,12 @@
|
|||
Returns a [Vector3] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the origin of the agent's parent.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the object's [RID].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_target_location" qualifiers="const">
|
||||
<return type="Vector3" />
|
||||
<description>
|
||||
|
|
|
@ -45,6 +45,12 @@
|
|||
Returns a [Vector2] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_rid" qualifiers="const">
|
||||
<return type="RID" />
|
||||
<description>
|
||||
Returns the object's [RID].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_target_location" qualifiers="const">
|
||||
<return type="Vector2" />
|
||||
<description>
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include "servers/navigation_2d_server.h"
|
||||
|
||||
void NavigationAgent2D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_rid"), &NavigationAgent2D::get_rid);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_target_desired_distance", "desired_distance"), &NavigationAgent2D::set_target_desired_distance);
|
||||
ClassDB::bind_method(D_METHOD("get_target_desired_distance"), &NavigationAgent2D::get_target_desired_distance);
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include "servers/navigation_server.h"
|
||||
|
||||
void NavigationAgent::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_rid"), &NavigationAgent::get_rid);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_target_desired_distance", "desired_distance"), &NavigationAgent::set_target_desired_distance);
|
||||
ClassDB::bind_method(D_METHOD("get_target_desired_distance"), &NavigationAgent::get_target_desired_distance);
|
||||
|
||||
|
|
Loading…
Reference in a new issue