diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-30 13:35:48 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-30 13:35:48 +0100 |
commit | 6bdc4ea88c283f5ec29278caaee5a019bca5e82f (patch) | |
tree | d8396b6286a372fea4d52b5b106d83b452fdfece /servers/navigation_server_3d.cpp | |
parent | ab70b6ca8a12d832762ca67ad6b572da1fefac12 (diff) | |
parent | 1bc2c7cb123fc22a22cfcffb171618dafbd98e3b (diff) | |
download | redot-engine-6bdc4ea88c283f5ec29278caaee5a019bca5e82f.tar.gz |
Merge pull request #72344 from smix8/default_navmap_on_demand_only_4.x
Create default World navigation maps on demand only
Diffstat (limited to 'servers/navigation_server_3d.cpp')
-rw-r--r-- | servers/navigation_server_3d.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/servers/navigation_server_3d.cpp b/servers/navigation_server_3d.cpp index 5b95317a38..8f2cff0e04 100644 --- a/servers/navigation_server_3d.cpp +++ b/servers/navigation_server_3d.cpp @@ -30,9 +30,7 @@ #include "navigation_server_3d.h" -#ifdef DEBUG_ENABLED #include "core/config/project_settings.h" -#endif // DEBUG_ENABLED NavigationServer3D *NavigationServer3D::singleton = nullptr; @@ -145,6 +143,14 @@ NavigationServer3D::NavigationServer3D() { ERR_FAIL_COND(singleton != nullptr); singleton = this; + GLOBAL_DEF("navigation/2d/default_cell_size", 1); + GLOBAL_DEF("navigation/2d/default_edge_connection_margin", 1); + GLOBAL_DEF("navigation/2d/default_link_connection_radius", 4); + + GLOBAL_DEF("navigation/3d/default_cell_size", 0.25); + GLOBAL_DEF("navigation/3d/default_edge_connection_margin", 0.25); + GLOBAL_DEF("navigation/3d/default_link_connection_radius", 1.0); + #ifdef DEBUG_ENABLED debug_navigation_edge_connection_color = GLOBAL_DEF("debug/shapes/navigation/edge_connection_color", Color(1.0, 0.0, 1.0, 1.0)); debug_navigation_geometry_edge_color = GLOBAL_DEF("debug/shapes/navigation/geometry_edge_color", Color(0.5, 1.0, 1.0, 1.0)); |