summaryrefslogtreecommitdiff
path: root/modules/gridmap/grid_map.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-03-12 13:13:44 +0100
committerGitHub <noreply@github.com>2021-03-12 13:13:44 +0100
commitb5406a293d06ecdecaaf173b223f5f1cf8f120a5 (patch)
tree1f6e6458b4baaa232ea30ce54e61d6ff55aa1770 /modules/gridmap/grid_map.cpp
parenta19ffe80da0b117137984855b4071dab0192a350 (diff)
parent809d88b925d440fef6cb9b6572315e365f91487e (diff)
Merge pull request #46934 from JFonS/fix_gridmap_visibility
Fix visibility toggle for baked GridMaps
Diffstat (limited to 'modules/gridmap/grid_map.cpp')
-rw-r--r--modules/gridmap/grid_map.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index c1c230d104..4e4f88ed6a 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -715,6 +715,10 @@ void GridMap::_update_visibility() {
RS::get_singleton()->instance_set_visible(mi.instance, is_visible_in_tree());
}
}
+
+ for (int i = 0; i < baked_meshes.size(); i++) {
+ RS::get_singleton()->instance_set_visible(baked_meshes[i].instance, is_visible_in_tree());
+ }
}
void GridMap::_queue_octants_dirty() {