From 2852fb43f707789bc05083302b1f2d6a19edec42 Mon Sep 17 00:00:00 2001 From: smix8 <52464204+smix8@users.noreply.github.com> Date: Fri, 14 Jul 2023 21:59:47 +0200 Subject: [PATCH] Change 2D navigation ProjectSettings from integers to floats Changes 2D navigation ProjectSettings from integers to floats. --- doc/classes/ProjectSettings.xml | 6 +++--- servers/navigation_server_3d.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 744c72af4d18..0c78525e4582 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1943,13 +1943,13 @@ This is used by servers when used in multi-threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number. - + Default cell size for 2D navigation maps. See [method NavigationServer2D.map_set_cell_size]. - + Default edge connection margin for 2D navigation maps. See [method NavigationServer2D.map_set_edge_connection_margin]. - + Default link connection radius for 2D navigation maps. See [method NavigationServer2D.map_set_link_connection_radius]. diff --git a/servers/navigation_server_3d.cpp b/servers/navigation_server_3d.cpp index 3b26945c8648..4da479639d3c 100644 --- a/servers/navigation_server_3d.cpp +++ b/servers/navigation_server_3d.cpp @@ -185,10 +185,10 @@ NavigationServer3D::NavigationServer3D() { ERR_FAIL_COND(singleton != nullptr); singleton = this; - GLOBAL_DEF_BASIC("navigation/2d/default_cell_size", 1); + GLOBAL_DEF_BASIC("navigation/2d/default_cell_size", 1.0); GLOBAL_DEF("navigation/2d/use_edge_connections", true); - GLOBAL_DEF_BASIC("navigation/2d/default_edge_connection_margin", 1); - GLOBAL_DEF_BASIC("navigation/2d/default_link_connection_radius", 4); + GLOBAL_DEF_BASIC("navigation/2d/default_edge_connection_margin", 1.0); + GLOBAL_DEF_BASIC("navigation/2d/default_link_connection_radius", 4.0); GLOBAL_DEF_BASIC("navigation/3d/default_cell_size", 0.25); GLOBAL_DEF_BASIC("navigation/3d/default_cell_height", 0.25);