From de1763d40d9ec7b53cdc90d7b5be7d0811794f45 Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 12 Jun 2023 08:37:57 +0200 Subject: [PATCH] Renamed neighbor_dist properties / getters / setters for the navigation server. --- doc/classes/Navigation2DServer.xml | 2 +- doc/classes/NavigationAgent.xml | 4 ++-- doc/classes/NavigationAgent2D.xml | 4 ++-- doc/classes/NavigationServer.xml | 2 +- doc/translations/classes.pot | 4 ++-- doc/translations/hu.po | 4 ++-- .../pandemonium_navigation_2d_server.cpp | 2 +- .../navigation/pandemonium_navigation_2d_server.h | 2 +- .../navigation/pandemonium_navigation_server.cpp | 2 +- modules/navigation/pandemonium_navigation_server.h | 2 +- .../navigation_dummy/dummy_navigation_2d_server.h | 2 +- modules/navigation_dummy/dummy_navigation_server.h | 2 +- scene/2d/navigation_agent_2d.cpp | 14 +++++++------- scene/2d/navigation_agent_2d.h | 8 ++++---- scene/2d/navigation_obstacle_2d.cpp | 2 +- scene/3d/navigation_agent.cpp | 14 +++++++------- scene/3d/navigation_agent.h | 8 ++++---- scene/3d/navigation_obstacle.cpp | 2 +- servers/navigation_2d_server.cpp | 2 +- servers/navigation_2d_server.h | 2 +- servers/navigation_server.cpp | 2 +- servers/navigation_server.h | 2 +- 22 files changed, 44 insertions(+), 44 deletions(-) diff --git a/doc/classes/Navigation2DServer.xml b/doc/classes/Navigation2DServer.xml index 5612829db..d6bc9320a 100644 --- a/doc/classes/Navigation2DServer.xml +++ b/doc/classes/Navigation2DServer.xml @@ -112,7 +112,7 @@ Sets the maximum speed of the agent. Must be positive. - + diff --git a/doc/classes/NavigationAgent.xml b/doc/classes/NavigationAgent.xml index d62b36ae3..090e5a824 100644 --- a/doc/classes/NavigationAgent.xml +++ b/doc/classes/NavigationAgent.xml @@ -186,7 +186,7 @@ A bitfield determining all navigation map layers the [NavigationAgent] belongs to. On path requests the agent will ignore navmeshes without at least one matching layer. - + The distance to search for other agents. @@ -202,7 +202,7 @@ Additional information to return with the navigation path. - The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_dist]). + The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_distance]). Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size. diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 39bbe26f1..ee357b887 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -186,7 +186,7 @@ A bitfield determining all navigation map layers the [NavigationAgent2D] belongs to. On path requests the agent will ignore navmeshes without at least one matching layer. - + The distance to search for other agents. @@ -199,7 +199,7 @@ Additional information to return with the navigation path. - The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_dist]). + The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_distance]). Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size. diff --git a/doc/classes/NavigationServer.xml b/doc/classes/NavigationServer.xml index 0bc3b6430..ca1fad02d 100644 --- a/doc/classes/NavigationServer.xml +++ b/doc/classes/NavigationServer.xml @@ -127,7 +127,7 @@ Sets the maximum speed of the agent. Must be positive. - + diff --git a/doc/translations/classes.pot b/doc/translations/classes.pot index 5e3adb9b9..8786cde1b 100644 --- a/doc/translations/classes.pot +++ b/doc/translations/classes.pot @@ -36290,7 +36290,7 @@ msgstr "" msgid "" "The radius of the avoidance agent. This is the \"body\" of the avoidance " "agent and not the avoidance maneuver starting radius (which is controlled by " -"[member neighbor_dist]).\n" +"[member neighbor_distance]).\n" "Does not affect normal pathfinding. To change an actor's pathfinding radius " "bake [NavigationMesh] resources with a different [member NavigationMesh." "agent_radius] property and use different navigation maps for each actor size." @@ -36401,7 +36401,7 @@ msgstr "" msgid "" "The radius of the avoidance agent. This is the \"body\" of the avoidance " "agent and not the avoidance maneuver starting radius (which is controlled by " -"[member neighbor_dist]).\n" +"[member neighbor_distance]).\n" "Does not affect normal pathfinding." msgstr "" diff --git a/doc/translations/hu.po b/doc/translations/hu.po index d7273a09d..e43d80296 100644 --- a/doc/translations/hu.po +++ b/doc/translations/hu.po @@ -36370,7 +36370,7 @@ msgstr "" msgid "" "The radius of the avoidance agent. This is the \"body\" of the avoidance " "agent and not the avoidance maneuver starting radius (which is controlled by " -"[member neighbor_dist]).\n" +"[member neighbor_distance]).\n" "Does not affect normal pathfinding. To change an actor's pathfinding radius " "bake [NavigationMesh] resources with a different [member NavigationMesh." "agent_radius] property and use different navigation maps for each actor size." @@ -36484,7 +36484,7 @@ msgstr "" msgid "" "The radius of the avoidance agent. This is the \"body\" of the avoidance " "agent and not the avoidance maneuver starting radius (which is controlled by " -"[member neighbor_dist]).\n" +"[member neighbor_distance]).\n" "Does not affect normal pathfinding." msgstr "" diff --git a/modules/navigation/pandemonium_navigation_2d_server.cpp b/modules/navigation/pandemonium_navigation_2d_server.cpp index 4ca17f1e9..d7a5a9c1d 100644 --- a/modules/navigation/pandemonium_navigation_2d_server.cpp +++ b/modules/navigation/pandemonium_navigation_2d_server.cpp @@ -322,7 +322,7 @@ bool FORWARD_1_C(agent_get_avoidance_enabled, RID, p_agent, rid_to_rid); void FORWARD_2(agent_set_map, RID, p_agent, RID, p_map, rid_to_rid, rid_to_rid); -void FORWARD_2(agent_set_neighbor_dist, RID, p_agent, real_t, p_dist, rid_to_rid, real_to_real); +void FORWARD_2(agent_set_neighbor_distance, RID, p_agent, real_t, p_dist, rid_to_rid, real_to_real); void FORWARD_2(agent_set_max_neighbors, RID, p_agent, int, p_count, rid_to_rid, int_to_int); diff --git a/modules/navigation/pandemonium_navigation_2d_server.h b/modules/navigation/pandemonium_navigation_2d_server.h index 9c65cad74..8588f7799 100644 --- a/modules/navigation/pandemonium_navigation_2d_server.h +++ b/modules/navigation/pandemonium_navigation_2d_server.h @@ -186,7 +186,7 @@ public: /// time of the simulation. If the number is too /// low, the simulation will not be safe. /// Must be non-negative. - virtual void agent_set_neighbor_dist(RID p_agent, real_t p_dist); + virtual void agent_set_neighbor_distance(RID p_agent, real_t p_dist); /// The maximum number of other agents this /// agent takes into account in the navigation. diff --git a/modules/navigation/pandemonium_navigation_server.cpp b/modules/navigation/pandemonium_navigation_server.cpp index 68cbbbe36..d23250373 100644 --- a/modules/navigation/pandemonium_navigation_server.cpp +++ b/modules/navigation/pandemonium_navigation_server.cpp @@ -730,7 +730,7 @@ COMMAND_2(agent_set_map, RID, p_agent, RID, p_map) { } } -COMMAND_2(agent_set_neighbor_dist, RID, p_agent, real_t, p_dist) { +COMMAND_2(agent_set_neighbor_distance, RID, p_agent, real_t, p_dist) { NavAgent *agent = agent_owner.getornull(p_agent); ERR_FAIL_COND(agent == nullptr); diff --git a/modules/navigation/pandemonium_navigation_server.h b/modules/navigation/pandemonium_navigation_server.h index 7f9a19bfc..073f46298 100644 --- a/modules/navigation/pandemonium_navigation_server.h +++ b/modules/navigation/pandemonium_navigation_server.h @@ -185,7 +185,7 @@ public: virtual bool agent_get_use_3d_avoidance(RID p_agent) const; COMMAND_2(agent_set_map, RID, p_agent, RID, p_map); virtual RID agent_get_map(RID p_agent) const; - COMMAND_2(agent_set_neighbor_dist, RID, p_agent, real_t, p_dist); + COMMAND_2(agent_set_neighbor_distance, RID, p_agent, real_t, p_dist); COMMAND_2(agent_set_max_neighbors, RID, p_agent, int, p_count); COMMAND_2(agent_set_time_horizon_agents, RID, p_agent, real_t, p_time_horizon); COMMAND_2(agent_set_time_horizon_obstacles, RID, p_agent, real_t, p_time_horizon); diff --git a/modules/navigation_dummy/dummy_navigation_2d_server.h b/modules/navigation_dummy/dummy_navigation_2d_server.h index e5a42dcd4..4a2ae0a86 100644 --- a/modules/navigation_dummy/dummy_navigation_2d_server.h +++ b/modules/navigation_dummy/dummy_navigation_2d_server.h @@ -79,7 +79,7 @@ public: virtual RID agent_get_map(RID p_agent) const { return RID(); } virtual void agent_set_avoidance_enabled(RID p_agent, bool p_enabled) {} virtual bool agent_get_avoidance_enabled(RID p_agent) const { return false; } - virtual void agent_set_neighbor_dist(RID p_agent, real_t p_dist) {} + virtual void agent_set_neighbor_distance(RID p_agent, real_t p_dist) {} virtual void agent_set_max_neighbors(RID p_agent, int p_count) {} virtual void agent_set_time_horizon_agents(RID p_agent, real_t p_time_horizon) {} virtual void agent_set_time_horizon_obstacles(RID p_agent, real_t p_time_horizon) {} diff --git a/modules/navigation_dummy/dummy_navigation_server.h b/modules/navigation_dummy/dummy_navigation_server.h index b0edcc462..37dfd7907 100644 --- a/modules/navigation_dummy/dummy_navigation_server.h +++ b/modules/navigation_dummy/dummy_navigation_server.h @@ -83,7 +83,7 @@ public: virtual bool agent_get_avoidance_enabled(RID p_agent) const { return false; } virtual void agent_set_use_3d_avoidance(RID p_agent, bool p_enabled) {} virtual bool agent_get_use_3d_avoidance(RID p_agent) const { return false; } - virtual void agent_set_neighbor_dist(RID p_agent, real_t p_dist) {} + virtual void agent_set_neighbor_distance(RID p_agent, real_t p_dist) {} virtual void agent_set_max_neighbors(RID p_agent, int p_count) {} virtual void agent_set_time_horizon_agents(RID p_agent, real_t p_time_horizon) {} virtual void agent_set_time_horizon_obstacles(RID p_agent, real_t p_time_horizon) {} diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp index c66f7fb67..6ce89546a 100644 --- a/scene/2d/navigation_agent_2d.cpp +++ b/scene/2d/navigation_agent_2d.cpp @@ -57,8 +57,8 @@ void NavigationAgent2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_navigation", "navigation"), &NavigationAgent2D::set_navigation_node); ClassDB::bind_method(D_METHOD("get_navigation"), &NavigationAgent2D::get_navigation_node); - ClassDB::bind_method(D_METHOD("set_neighbor_dist", "neighbor_dist"), &NavigationAgent2D::set_neighbor_dist); - ClassDB::bind_method(D_METHOD("get_neighbor_dist"), &NavigationAgent2D::get_neighbor_dist); + ClassDB::bind_method(D_METHOD("set_neighbor_distance", "neighbor_distance"), &NavigationAgent2D::set_neighbor_distance); + ClassDB::bind_method(D_METHOD("get_neighbor_distance"), &NavigationAgent2D::get_neighbor_distance); ClassDB::bind_method(D_METHOD("set_max_neighbors", "max_neighbors"), &NavigationAgent2D::set_max_neighbors); ClassDB::bind_method(D_METHOD("get_max_neighbors"), &NavigationAgent2D::get_max_neighbors); @@ -130,7 +130,7 @@ void NavigationAgent2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "avoidance_enabled"), "set_avoidance_enabled", "get_avoidance_enabled"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "velocity", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_velocity", "get_velocity"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.1,500,0.01"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_neighbor_dist", "get_neighbor_dist"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "neighbor_distance", PROPERTY_HINT_RANGE, "0.1,100000,0.01"), "set_neighbor_distance", "get_neighbor_distance"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_neighbors", PROPERTY_HINT_RANGE, "1,10000,1,or_greater"), "set_max_neighbors", "get_max_neighbors"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_horizon_agents", PROPERTY_HINT_RANGE, "0.0,10,0.01,or_greater,suffix:s"), "set_time_horizon_agents", "get_time_horizon_agents"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_horizon_obstacles", PROPERTY_HINT_RANGE, "0.0,10,0.01,or_greater,suffix:s"), "set_time_horizon_obstacles", "get_time_horizon_obstacles"); @@ -293,7 +293,7 @@ NavigationAgent2D::NavigationAgent2D() { navigation_finished = true; agent = Navigation2DServer::get_singleton()->agent_create(); - set_neighbor_dist(500.0); + set_neighbor_distance(500.0); set_max_neighbors(10); set_time_horizon_agents(1.0); set_time_horizon_obstacles(0.0); @@ -529,9 +529,9 @@ void NavigationAgent2D::set_radius(real_t p_radius) { Navigation2DServer::get_singleton()->agent_set_radius(agent, radius); } -void NavigationAgent2D::set_neighbor_dist(real_t p_dist) { - neighbor_dist = p_dist; - Navigation2DServer::get_singleton()->agent_set_neighbor_dist(agent, neighbor_dist); +void NavigationAgent2D::set_neighbor_distance(real_t p_dist) { + neighbor_distance = p_dist; + Navigation2DServer::get_singleton()->agent_set_neighbor_distance(agent, neighbor_distance); } void NavigationAgent2D::set_max_neighbors(int p_count) { diff --git a/scene/2d/navigation_agent_2d.h b/scene/2d/navigation_agent_2d.h index c1780400b..f04accea2 100644 --- a/scene/2d/navigation_agent_2d.h +++ b/scene/2d/navigation_agent_2d.h @@ -57,7 +57,7 @@ class NavigationAgent2D : public Node { real_t path_desired_distance; real_t target_desired_distance; real_t radius; - real_t neighbor_dist; + real_t neighbor_distance; int max_neighbors; real_t time_horizon_agents; real_t time_horizon_obstacles; @@ -166,9 +166,9 @@ public: return radius; } - void set_neighbor_dist(real_t p_dist); - real_t get_neighbor_dist() const { - return neighbor_dist; + void set_neighbor_distance(real_t p_dist); + real_t get_neighbor_distance() const { + return neighbor_distance; } void set_max_neighbors(int p_count); diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp index 8e029e6e2..2ecb5799d 100644 --- a/scene/2d/navigation_obstacle_2d.cpp +++ b/scene/2d/navigation_obstacle_2d.cpp @@ -168,7 +168,7 @@ NavigationObstacle2D::NavigationObstacle2D() { fake_agent = Navigation2DServer::get_singleton()->agent_create(); // change properties of the fake agent so it can act as fake obstacle with a radius - Navigation2DServer::get_singleton()->agent_set_neighbor_dist(fake_agent, 0.0); + Navigation2DServer::get_singleton()->agent_set_neighbor_distance(fake_agent, 0.0); Navigation2DServer::get_singleton()->agent_set_max_neighbors(fake_agent, 0); Navigation2DServer::get_singleton()->agent_set_time_horizon_agents(fake_agent, 0.0); Navigation2DServer::get_singleton()->agent_set_time_horizon_obstacles(fake_agent, 0.0); diff --git a/scene/3d/navigation_agent.cpp b/scene/3d/navigation_agent.cpp index 045ebe57c..6e82b3fed 100644 --- a/scene/3d/navigation_agent.cpp +++ b/scene/3d/navigation_agent.cpp @@ -71,8 +71,8 @@ void NavigationAgent::_bind_methods() { ClassDB::bind_method(D_METHOD("set_navigation_map", "navigation_map"), &NavigationAgent::set_navigation_map); ClassDB::bind_method(D_METHOD("get_navigation_map"), &NavigationAgent::get_navigation_map); - ClassDB::bind_method(D_METHOD("set_neighbor_dist", "neighbor_dist"), &NavigationAgent::set_neighbor_dist); - ClassDB::bind_method(D_METHOD("get_neighbor_dist"), &NavigationAgent::get_neighbor_dist); + ClassDB::bind_method(D_METHOD("set_neighbor_distance", "neighbor_distance"), &NavigationAgent::set_neighbor_distance); + ClassDB::bind_method(D_METHOD("get_neighbor_distance"), &NavigationAgent::get_neighbor_distance); ClassDB::bind_method(D_METHOD("set_max_neighbors", "max_neighbors"), &NavigationAgent::set_max_neighbors); ClassDB::bind_method(D_METHOD("get_max_neighbors"), &NavigationAgent::get_max_neighbors); @@ -145,7 +145,7 @@ void NavigationAgent::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "velocity", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_velocity", "get_velocity"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "height", PROPERTY_HINT_RANGE, "0.01,100,0.01,or_greater,suffix:m"), "set_height", "get_height"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0.01,100,0.01,or_greater,suffix:m"), "set_radius", "get_radius"); - ADD_PROPERTY(PropertyInfo(Variant::REAL, "neighbor_dist", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_neighbor_dist", "get_neighbor_dist"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "neighbor_distance", PROPERTY_HINT_RANGE, "0.1,10000,0.01"), "set_neighbor_distance", "get_neighbor_distance"); ADD_PROPERTY(PropertyInfo(Variant::INT, "max_neighbors", PROPERTY_HINT_RANGE, "1,10000,1"), "set_max_neighbors", "get_max_neighbors"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_horizon_agents", PROPERTY_HINT_RANGE, "0.0,10,0.01,or_greater,suffix:s"), "set_time_horizon_agents", "get_time_horizon_agents"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_horizon_obstacles", PROPERTY_HINT_RANGE, "0.0,10,0.01,or_greater,suffix:s"), "set_time_horizon_obstacles", "get_time_horizon_obstacles"); @@ -319,7 +319,7 @@ NavigationAgent::NavigationAgent() { agent = NavigationServer::get_singleton()->agent_create(); - NavigationServer::get_singleton()->agent_set_neighbor_dist(agent, neighbor_dist); + NavigationServer::get_singleton()->agent_set_neighbor_distance(agent, neighbor_distance); NavigationServer::get_singleton()->agent_set_max_neighbors(agent, max_neighbors); NavigationServer::get_singleton()->agent_set_time_horizon_agents(agent, time_horizon_agents); NavigationServer::get_singleton()->agent_set_time_horizon_obstacles(agent, time_horizon_obstacles); @@ -506,9 +506,9 @@ void NavigationAgent::set_use_3d_avoidance(bool p_use_3d_avoidance) { property_list_changed_notify(); } -void NavigationAgent::set_neighbor_dist(real_t p_dist) { - neighbor_dist = p_dist; - NavigationServer::get_singleton()->agent_set_neighbor_dist(agent, neighbor_dist); +void NavigationAgent::set_neighbor_distance(real_t p_dist) { + neighbor_distance = p_dist; + NavigationServer::get_singleton()->agent_set_neighbor_distance(agent, neighbor_distance); } void NavigationAgent::set_max_neighbors(int p_count) { diff --git a/scene/3d/navigation_agent.h b/scene/3d/navigation_agent.h index f41cf7237..d8e7ca883 100644 --- a/scene/3d/navigation_agent.h +++ b/scene/3d/navigation_agent.h @@ -64,7 +64,7 @@ class NavigationAgent : public Node { real_t height; real_t radius; real_t path_height_offset; - real_t neighbor_dist; + real_t neighbor_distance; int max_neighbors; real_t time_horizon_agents; real_t time_horizon_obstacles; @@ -191,9 +191,9 @@ public: void set_use_3d_avoidance(bool p_use_3d_avoidance); bool get_use_3d_avoidance() const { return use_3d_avoidance; } - void set_neighbor_dist(real_t p_dist); - real_t get_neighbor_dist() const { - return neighbor_dist; + void set_neighbor_distance(real_t p_dist); + real_t get_neighbor_distance() const { + return neighbor_distance; } void set_max_neighbors(int p_count); diff --git a/scene/3d/navigation_obstacle.cpp b/scene/3d/navigation_obstacle.cpp index e8bc0096a..0f32bcedb 100644 --- a/scene/3d/navigation_obstacle.cpp +++ b/scene/3d/navigation_obstacle.cpp @@ -198,7 +198,7 @@ NavigationObstacle::NavigationObstacle() { fake_agent = NavigationServer::get_singleton()->agent_create(); // change properties of the fake agent so it can act as fake obstacle with a radius - NavigationServer::get_singleton()->agent_set_neighbor_dist(fake_agent, 0.0); + NavigationServer::get_singleton()->agent_set_neighbor_distance(fake_agent, 0.0); NavigationServer::get_singleton()->agent_set_max_neighbors(fake_agent, 0); NavigationServer::get_singleton()->agent_set_time_horizon_agents(fake_agent, 0.0); NavigationServer::get_singleton()->agent_set_time_horizon_obstacles(fake_agent, 0.0); diff --git a/servers/navigation_2d_server.cpp b/servers/navigation_2d_server.cpp index dcec06fae..8fd048054 100644 --- a/servers/navigation_2d_server.cpp +++ b/servers/navigation_2d_server.cpp @@ -106,7 +106,7 @@ void Navigation2DServer::_bind_methods() { ClassDB::bind_method(D_METHOD("agent_get_avoidance_enabled", "agent"), &Navigation2DServer::agent_get_avoidance_enabled); ClassDB::bind_method(D_METHOD("agent_set_map", "agent", "map"), &Navigation2DServer::agent_set_map); ClassDB::bind_method(D_METHOD("agent_get_map", "agent"), &Navigation2DServer::agent_get_map); - ClassDB::bind_method(D_METHOD("agent_set_neighbor_dist", "agent", "dist"), &Navigation2DServer::agent_set_neighbor_dist); + ClassDB::bind_method(D_METHOD("agent_set_neighbor_distance", "agent", "dist"), &Navigation2DServer::agent_set_neighbor_distance); ClassDB::bind_method(D_METHOD("agent_set_max_neighbors", "agent", "count"), &Navigation2DServer::agent_set_max_neighbors); ClassDB::bind_method(D_METHOD("agent_set_time_horizon_agents", "agent", "time_horizon"), &Navigation2DServer::agent_set_time_horizon_agents); ClassDB::bind_method(D_METHOD("agent_set_time_horizon_obstacles", "agent", "time_horizon"), &Navigation2DServer::agent_set_time_horizon_obstacles); diff --git a/servers/navigation_2d_server.h b/servers/navigation_2d_server.h index abf8562c1..c431f1a30 100644 --- a/servers/navigation_2d_server.h +++ b/servers/navigation_2d_server.h @@ -193,7 +193,7 @@ public: /// time of the simulation. If the number is too /// low, the simulation will not be safe. /// Must be non-negative. - virtual void agent_set_neighbor_dist(RID p_agent, real_t p_dist) = 0; + virtual void agent_set_neighbor_distance(RID p_agent, real_t p_dist) = 0; /// The maximum number of other agents this /// agent takes into account in the navigation. diff --git a/servers/navigation_server.cpp b/servers/navigation_server.cpp index dfc0112b0..d193075c9 100644 --- a/servers/navigation_server.cpp +++ b/servers/navigation_server.cpp @@ -128,7 +128,7 @@ void NavigationServer::_bind_methods() { ClassDB::bind_method(D_METHOD("agent_set_map", "agent", "map"), &NavigationServer::agent_set_map); ClassDB::bind_method(D_METHOD("agent_get_map", "agent"), &NavigationServer::agent_get_map); - ClassDB::bind_method(D_METHOD("agent_set_neighbor_dist", "agent", "dist"), &NavigationServer::agent_set_neighbor_dist); + ClassDB::bind_method(D_METHOD("agent_set_neighbor_distance", "agent", "dist"), &NavigationServer::agent_set_neighbor_distance); ClassDB::bind_method(D_METHOD("agent_set_max_neighbors", "agent", "count"), &NavigationServer::agent_set_max_neighbors); ClassDB::bind_method(D_METHOD("agent_set_time_horizon_agents", "agent", "time_horizon"), &NavigationServer::agent_set_time_horizon_agents); ClassDB::bind_method(D_METHOD("agent_set_time_horizon_obstacles", "agent", "time_horizon"), &NavigationServer::agent_set_time_horizon_obstacles); diff --git a/servers/navigation_server.h b/servers/navigation_server.h index 9d78824e4..66e90394f 100644 --- a/servers/navigation_server.h +++ b/servers/navigation_server.h @@ -212,7 +212,7 @@ public: /// time of the simulation. If the number is too /// low, the simulation will not be safe. /// Must be non-negative. - virtual void agent_set_neighbor_dist(RID p_agent, real_t p_dist) = 0; + virtual void agent_set_neighbor_distance(RID p_agent, real_t p_dist) = 0; /// The maximum number of other agents this /// agent takes into account in the navigation.