summaryrefslogtreecommitdiff
path: root/modules/gdnavigation/nav_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnavigation/nav_map.h')
-rw-r--r--modules/gdnavigation/nav_map.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/gdnavigation/nav_map.h b/modules/gdnavigation/nav_map.h
index 4543f00926..d39e301511 100644
--- a/modules/gdnavigation/nav_map.h
+++ b/modules/gdnavigation/nav_map.h
@@ -48,17 +48,17 @@ class NavRegion;
class NavMap : public NavRid {
/// Map Up
- Vector3 up;
+ Vector3 up = Vector3(0, 1, 0);
/// To find the polygons edges the vertices are displaced in a grid where
/// each cell has the following cell_size.
- real_t cell_size;
+ real_t cell_size = 0.3;
/// This value is used to detect the near edges to connect.
- real_t edge_connection_margin;
+ real_t edge_connection_margin = 5.0;
- bool regenerate_polygons;
- bool regenerate_links;
+ bool regenerate_polygons = true;
+ bool regenerate_links = true;
std::vector<NavRegion *> regions;
@@ -69,7 +69,7 @@ class NavMap : public NavRid {
RVO::KdTree rvo;
/// Is agent array modified?
- bool agents_dirty;
+ bool agents_dirty = false;
/// All the Agents (even the controlled one)
std::vector<RvoAgent *> agents;
@@ -78,13 +78,13 @@ class NavMap : public NavRid {
std::vector<RvoAgent *> controlled_agents;
/// Physics delta time
- real_t deltatime;
+ real_t deltatime = 0.0;
/// Change the id each time the map is updated.
- uint32_t map_update_id;
+ uint32_t map_update_id = 0;
public:
- NavMap();
+ NavMap() {}
void set_up(Vector3 p_up);
Vector3 get_up() const {