diff options
| author | smix8 <52464204+smix8@users.noreply.github.com> | 2023-06-17 11:29:17 +0200 |
|---|---|---|
| committer | smix8 <52464204+smix8@users.noreply.github.com> | 2023-06-17 11:29:17 +0200 |
| commit | c4f544f8028d049d51df05336f644251979beab8 (patch) | |
| tree | 4d1370d887a811a67b5dc3a8ff5d3ac95a8a9261 | |
| parent | fa268be823b97095245f731ad59335a935e6b0ba (diff) | |
| download | redot-engine-c4f544f8028d049d51df05336f644251979beab8.tar.gz | |
Add ProjectSettings navigation map default up
Adds ProjectSettings navigation map default up.
| -rw-r--r-- | doc/classes/ProjectSettings.xml | 3 | ||||
| -rw-r--r-- | scene/resources/world_3d.cpp | 1 | ||||
| -rw-r--r-- | servers/navigation_server_3d.cpp | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index ce36a0336d..720a4f6a47 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1964,6 +1964,9 @@ <member name="navigation/3d/default_link_connection_radius" type="float" setter="" getter="" default="1.0"> Default link connection radius for 3D navigation maps. See [method NavigationServer3D.map_set_link_connection_radius]. </member> + <member name="navigation/3d/default_up" type="Vector3" setter="" getter="" default="Vector3(0, 1, 0)"> + Default up orientation for 3D navigation maps. See [method NavigationServer3D.map_set_up]. + </member> <member name="navigation/3d/use_edge_connections" type="bool" setter="" getter="" default="true"> If enabled 3D navigation regions will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. This setting only affects World3D default navigation maps. </member> diff --git a/scene/resources/world_3d.cpp b/scene/resources/world_3d.cpp index 297d219caf..b8646c5387 100644 --- a/scene/resources/world_3d.cpp +++ b/scene/resources/world_3d.cpp @@ -68,6 +68,7 @@ RID World3D::get_navigation_map() const { NavigationServer3D::get_singleton()->map_set_active(navigation_map, true); NavigationServer3D::get_singleton()->map_set_cell_size(navigation_map, GLOBAL_GET("navigation/3d/default_cell_size")); NavigationServer3D::get_singleton()->map_set_cell_height(navigation_map, GLOBAL_GET("navigation/3d/default_cell_height")); + NavigationServer3D::get_singleton()->map_set_up(navigation_map, GLOBAL_GET("navigation/3d/default_up")); NavigationServer3D::get_singleton()->map_set_use_edge_connections(navigation_map, GLOBAL_GET("navigation/3d/use_edge_connections")); NavigationServer3D::get_singleton()->map_set_edge_connection_margin(navigation_map, GLOBAL_GET("navigation/3d/default_edge_connection_margin")); NavigationServer3D::get_singleton()->map_set_link_connection_radius(navigation_map, GLOBAL_GET("navigation/3d/default_link_connection_radius")); diff --git a/servers/navigation_server_3d.cpp b/servers/navigation_server_3d.cpp index 2536ce719d..2d4bc018f0 100644 --- a/servers/navigation_server_3d.cpp +++ b/servers/navigation_server_3d.cpp @@ -186,6 +186,7 @@ NavigationServer3D::NavigationServer3D() { GLOBAL_DEF_BASIC("navigation/3d/default_cell_size", 0.25); GLOBAL_DEF_BASIC("navigation/3d/default_cell_height", 0.25); + GLOBAL_DEF("navigation/3d/default_up", Vector3(0, 1, 0)); GLOBAL_DEF("navigation/3d/use_edge_connections", true); GLOBAL_DEF_BASIC("navigation/3d/default_edge_connection_margin", 0.25); GLOBAL_DEF_BASIC("navigation/3d/default_link_connection_radius", 1.0); |
