diff options
Diffstat (limited to 'modules/navigation')
-rw-r--r-- | modules/navigation/godot_navigation_server.cpp | 16 | ||||
-rw-r--r-- | modules/navigation/godot_navigation_server.h | 8 | ||||
-rw-r--r-- | modules/navigation/nav_link.cpp | 8 | ||||
-rw-r--r-- | modules/navigation/nav_link.h | 16 | ||||
-rw-r--r-- | modules/navigation/nav_map.cpp | 4 | ||||
-rw-r--r-- | modules/navigation/nav_utils.h | 2 |
6 files changed, 27 insertions, 27 deletions
diff --git a/modules/navigation/godot_navigation_server.cpp b/modules/navigation/godot_navigation_server.cpp index 2b5db6462c..5baf6db2e8 100644 --- a/modules/navigation/godot_navigation_server.cpp +++ b/modules/navigation/godot_navigation_server.cpp @@ -535,32 +535,32 @@ uint32_t GodotNavigationServer::link_get_navigation_layers(const RID p_link) con return link->get_navigation_layers(); } -COMMAND_2(link_set_start_location, RID, p_link, Vector3, p_location) { +COMMAND_2(link_set_start_position, RID, p_link, Vector3, p_position) { NavLink *link = link_owner.get_or_null(p_link); ERR_FAIL_COND(link == nullptr); - link->set_start_location(p_location); + link->set_start_position(p_position); } -Vector3 GodotNavigationServer::link_get_start_location(RID p_link) const { +Vector3 GodotNavigationServer::link_get_start_position(RID p_link) const { const NavLink *link = link_owner.get_or_null(p_link); ERR_FAIL_COND_V(link == nullptr, Vector3()); - return link->get_start_location(); + return link->get_start_position(); } -COMMAND_2(link_set_end_location, RID, p_link, Vector3, p_location) { +COMMAND_2(link_set_end_position, RID, p_link, Vector3, p_position) { NavLink *link = link_owner.get_or_null(p_link); ERR_FAIL_COND(link == nullptr); - link->set_end_location(p_location); + link->set_end_position(p_position); } -Vector3 GodotNavigationServer::link_get_end_location(RID p_link) const { +Vector3 GodotNavigationServer::link_get_end_position(RID p_link) const { const NavLink *link = link_owner.get_or_null(p_link); ERR_FAIL_COND_V(link == nullptr, Vector3()); - return link->get_end_location(); + return link->get_end_position(); } COMMAND_2(link_set_enter_cost, RID, p_link, real_t, p_enter_cost) { diff --git a/modules/navigation/godot_navigation_server.h b/modules/navigation/godot_navigation_server.h index a87a88d3bc..efefa60de8 100644 --- a/modules/navigation/godot_navigation_server.h +++ b/modules/navigation/godot_navigation_server.h @@ -158,10 +158,10 @@ public: virtual bool link_is_bidirectional(RID p_link) const override; COMMAND_2(link_set_navigation_layers, RID, p_link, uint32_t, p_navigation_layers); virtual uint32_t link_get_navigation_layers(RID p_link) const override; - COMMAND_2(link_set_start_location, RID, p_link, Vector3, p_location); - virtual Vector3 link_get_start_location(RID p_link) const override; - COMMAND_2(link_set_end_location, RID, p_link, Vector3, p_location); - virtual Vector3 link_get_end_location(RID p_link) const override; + COMMAND_2(link_set_start_position, RID, p_link, Vector3, p_position); + virtual Vector3 link_get_start_position(RID p_link) const override; + COMMAND_2(link_set_end_position, RID, p_link, Vector3, p_position); + virtual Vector3 link_get_end_position(RID p_link) const override; COMMAND_2(link_set_enter_cost, RID, p_link, real_t, p_enter_cost); virtual real_t link_get_enter_cost(RID p_link) const override; COMMAND_2(link_set_travel_cost, RID, p_link, real_t, p_travel_cost); diff --git a/modules/navigation/nav_link.cpp b/modules/navigation/nav_link.cpp index 05d2b21487..ad87cc0b05 100644 --- a/modules/navigation/nav_link.cpp +++ b/modules/navigation/nav_link.cpp @@ -42,13 +42,13 @@ void NavLink::set_bidirectional(bool p_bidirectional) { link_dirty = true; } -void NavLink::set_start_location(const Vector3 p_location) { - start_location = p_location; +void NavLink::set_start_position(const Vector3 p_position) { + start_position = p_position; link_dirty = true; } -void NavLink::set_end_location(const Vector3 p_location) { - end_location = p_location; +void NavLink::set_end_position(const Vector3 p_position) { + end_position = p_position; link_dirty = true; } diff --git a/modules/navigation/nav_link.h b/modules/navigation/nav_link.h index 47c1211db8..0b8ad4db69 100644 --- a/modules/navigation/nav_link.h +++ b/modules/navigation/nav_link.h @@ -37,8 +37,8 @@ class NavLink : public NavBase { NavMap *map = nullptr; bool bidirectional = true; - Vector3 start_location; - Vector3 end_location; + Vector3 start_position; + Vector3 end_position; bool link_dirty = true; @@ -57,14 +57,14 @@ public: return bidirectional; } - void set_start_location(Vector3 p_location); - Vector3 get_start_location() const { - return start_location; + void set_start_position(Vector3 p_position); + Vector3 get_start_position() const { + return start_position; } - void set_end_location(Vector3 p_location); - Vector3 get_end_location() const { - return end_location; + void set_end_position(Vector3 p_position); + Vector3 get_end_position() const { + return end_position; } bool check_dirty(); diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp index fe255c1ce8..d763b1d3bc 100644 --- a/modules/navigation/nav_map.cpp +++ b/modules/navigation/nav_map.cpp @@ -780,8 +780,8 @@ void NavMap::sync() { // Search for polygons within range of a nav link. for (const NavLink *link : links) { - const Vector3 start = link->get_start_location(); - const Vector3 end = link->get_end_location(); + const Vector3 start = link->get_start_position(); + const Vector3 end = link->get_end_position(); gd::Polygon *closest_start_polygon = nullptr; real_t closest_start_distance = link_connection_radius; diff --git a/modules/navigation/nav_utils.h b/modules/navigation/nav_utils.h index 50437469aa..06a1a1f403 100644 --- a/modules/navigation/nav_utils.h +++ b/modules/navigation/nav_utils.h @@ -125,7 +125,7 @@ struct NavigationPoly { Vector3 back_navigation_edge_pathway_start; Vector3 back_navigation_edge_pathway_end; - /// The entry location of this poly. + /// The entry position of this poly. Vector3 entry; /// The distance to the destination. float traveled_distance = 0.0; |