You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Add more detailed Navigation Debug Visualization
- Adds more customization options to ProjectSettings. - Displays navregion edge connections and navigation polygon edges in editor and at runtime. - Majority of debug code moved from SceneTree to NavigationServer. - Removes the irritating debug MeshInstance child node from NavigationRegion3D and replaces it with direct RenderingServer API.
This commit is contained in:
@@ -553,6 +553,19 @@ void EditorNode::_update_from_settings() {
|
||||
tree->set_debug_collision_contact_color(GLOBAL_GET("debug/shapes/collision/contact_color"));
|
||||
tree->set_debug_navigation_color(GLOBAL_GET("debug/shapes/navigation/geometry_color"));
|
||||
tree->set_debug_navigation_disabled_color(GLOBAL_GET("debug/shapes/navigation/disabled_geometry_color"));
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_edge_connection_color(GLOBAL_GET("debug/shapes/navigation/edge_connection_color"));
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_geometry_edge_color(GLOBAL_GET("debug/shapes/navigation/geometry_edge_color"));
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_geometry_face_color(GLOBAL_GET("debug/shapes/navigation/geometry_face_color"));
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_geometry_edge_disabled_color(GLOBAL_GET("debug/shapes/navigation/geometry_edge_disabled_color"));
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_geometry_face_disabled_color(GLOBAL_GET("debug/shapes/navigation/geometry_face_disabled_color"));
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_enable_edge_connections(GLOBAL_GET("debug/shapes/navigation/enable_edge_connections"));
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_enable_edge_connections_xray(GLOBAL_GET("debug/shapes/navigation/enable_edge_connections_xray"));
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_enable_edge_lines(GLOBAL_GET("debug/shapes/navigation/enable_edge_lines"));
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_enable_edge_lines_xray(GLOBAL_GET("debug/shapes/navigation/enable_edge_lines_xray"));
|
||||
NavigationServer3D::get_singleton_mut()->set_debug_navigation_enable_geometry_face_random_color(GLOBAL_GET("debug/shapes/navigation/enable_geometry_face_random_color"));
|
||||
#endif // DEBUG_ENABLED
|
||||
}
|
||||
|
||||
void EditorNode::_select_default_main_screen_plugin() {
|
||||
@@ -5910,7 +5923,11 @@ EditorNode::EditorNode() {
|
||||
RenderingServer::get_singleton()->set_debug_generate_wireframes(true);
|
||||
|
||||
// No navigation server by default if in editor.
|
||||
NavigationServer3D::get_singleton()->set_active(false);
|
||||
if (NavigationServer3D::get_singleton()->get_debug_enabled()) {
|
||||
NavigationServer3D::get_singleton()->set_active(true);
|
||||
} else {
|
||||
NavigationServer3D::get_singleton()->set_active(false);
|
||||
}
|
||||
|
||||
// No physics by default if in editor.
|
||||
PhysicsServer3D::get_singleton()->set_active(false);
|
||||
|
||||
Reference in New Issue
Block a user