backported method get_rid for NavigationAgent
This commit is contained in:
@ -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.
|
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>
|
</description>
|
||||||
</method>
|
</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">
|
<method name="get_target_location" qualifiers="const">
|
||||||
<return type="Vector3" />
|
<return type="Vector3" />
|
||||||
<description>
|
<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.
|
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>
|
</description>
|
||||||
</method>
|
</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">
|
<method name="get_target_location" qualifiers="const">
|
||||||
<return type="Vector2" />
|
<return type="Vector2" />
|
||||||
<description>
|
<description>
|
||||||
|
|||||||
@ -35,6 +35,8 @@
|
|||||||
#include "servers/navigation_2d_server.h"
|
#include "servers/navigation_2d_server.h"
|
||||||
|
|
||||||
void NavigationAgent2D::_bind_methods() {
|
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("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);
|
ClassDB::bind_method(D_METHOD("get_target_desired_distance"), &NavigationAgent2D::get_target_desired_distance);
|
||||||
|
|
||||||
|
|||||||
@ -35,6 +35,8 @@
|
|||||||
#include "servers/navigation_server.h"
|
#include "servers/navigation_server.h"
|
||||||
|
|
||||||
void NavigationAgent::_bind_methods() {
|
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("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);
|
ClassDB::bind_method(D_METHOD("get_target_desired_distance"), &NavigationAgent::get_target_desired_distance);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user