summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-08-11 09:42:38 +0200
committerGitHub <noreply@github.com>2022-08-11 09:42:38 +0200
commite9e9e92e4864f9dc34e24f37cb93c88cc3649104 (patch)
treedc474e9a7c6186fd930363437bd52e22f7a62801 /scene/3d
parent106b6805018649b13da9e9508e80611f62ed660a (diff)
parent0e4c31ce57443d03a7d223618760998ad807def6 (diff)
Merge pull request #64147 from smix8/fix_navigationregion3d_debug_doublerender_4.x
Fix NavigationRegion3D debug mesh rendering twice in Editor
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/navigation_region_3d.cpp6
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);