summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorPawel Lampe <pawel.lampe@gmail.com>2022-01-28 22:35:05 +0100
committerPawel Lampe <pawel.lampe@gmail.com>2022-01-28 22:35:05 +0100
commit450e29a569b31539cbabd3221f998d2d51bf51ec (patch)
tree26d6c6f751a1c502e1196b363965c67b6f5327b8 /scene/resources
parentb9a2569be6fcd1127454127d989b504334d2dac8 (diff)
Improve Navigation2D default settings, see #56852
This commit reduces `cell_size` and `edge_connection_margin` default values so that `Navigation2D` behaves more like in Godot <= `3.4` by default.
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/world_2d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp
index c937d988d2..9d8e0f7547 100644
--- a/scene/resources/world_2d.cpp
+++ b/scene/resources/world_2d.cpp
@@ -83,8 +83,8 @@ World2D::World2D() {
// Create and configure the navigation_map to be more friendly with pixels than meters.
navigation_map = NavigationServer2D::get_singleton()->map_create();
NavigationServer2D::get_singleton()->map_set_active(navigation_map, true);
- NavigationServer2D::get_singleton()->map_set_cell_size(navigation_map, GLOBAL_DEF("navigation/2d/default_cell_size", 10));
- NavigationServer2D::get_singleton()->map_set_edge_connection_margin(navigation_map, GLOBAL_DEF("navigation/2d/default_edge_connection_margin", 5));
+ NavigationServer2D::get_singleton()->map_set_cell_size(navigation_map, GLOBAL_DEF("navigation/2d/default_cell_size", 1));
+ NavigationServer2D::get_singleton()->map_set_edge_connection_margin(navigation_map, GLOBAL_DEF("navigation/2d/default_edge_connection_margin", 1));
}
World2D::~World2D() {