diff options
Diffstat (limited to 'modules/navigation/nav_region.h')
-rw-r--r-- | modules/navigation/nav_region.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/navigation/nav_region.h b/modules/navigation/nav_region.h index 7a6da281c0..484856ae36 100644 --- a/modules/navigation/nav_region.h +++ b/modules/navigation/nav_region.h @@ -45,7 +45,9 @@ class NavRegion : public NavRid { NavMap *map = nullptr; Transform3D transform; Ref<NavigationMesh> mesh; - uint32_t layers = 1; + uint32_t navigation_layers = 1; + float enter_cost = 0.0; + float travel_cost = 1.0; Vector<gd::Edge::Connection> connections; bool polygons_dirty = true; @@ -65,8 +67,14 @@ public: return map; } - void set_layers(uint32_t p_layers); - uint32_t get_layers() const; + void set_enter_cost(float p_enter_cost) { enter_cost = MAX(p_enter_cost, 0.0); } + float get_enter_cost() const { return enter_cost; } + + void set_travel_cost(float p_travel_cost) { travel_cost = MAX(p_travel_cost, 0.0); } + float get_travel_cost() const { return travel_cost; } + + void set_navigation_layers(uint32_t p_navigation_layers); + uint32_t get_navigation_layers() const; void set_transform(Transform3D transform); const Transform3D &get_transform() const { |