diff options
| author | smix8 <52464204+smix8@users.noreply.github.com> | 2022-08-09 11:12:03 +0200 |
|---|---|---|
| committer | smix8 <52464204+smix8@users.noreply.github.com> | 2022-08-09 11:12:03 +0200 |
| commit | 0e4c31ce57443d03a7d223618760998ad807def6 (patch) | |
| tree | d10f30d4c8ab647d6c1feba9dfe0087d678a5738 | |
| parent | c2eaaef1497f8ad557aea9a14e2b3e0582fcfe54 (diff) | |
Fix NavigationRegion3D debug mesh rendering twice in Editor
Fixes double rendering of NavigationRegion3D debug mesh due to both 3DGizmo and runtime debug rendering the mesh at the same time.
| -rw-r--r-- | scene/3d/navigation_region_3d.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/3d/navigation_region_3d.cpp b/scene/3d/navigation_region_3d.cpp index 1edeff034d..29ad1ba93d 100644 --- a/scene/3d/navigation_region_3d.cpp +++ b/scene/3d/navigation_region_3d.cpp @@ -363,6 +363,12 @@ NavigationRegion3D::~NavigationRegion3D() { #ifdef DEBUG_ENABLED void NavigationRegion3D::_update_debug_mesh() { + if (Engine::get_singleton()->is_editor_hint()) { + // don't update inside Editor as node 3d gizmo takes care of this + // as collisions and selections for Editor Viewport need to be updated + return; + } + if (!NavigationServer3D::get_singleton()->get_debug_enabled()) { if (debug_instance.is_valid()) { RS::get_singleton()->instance_set_visible(debug_instance, false); |