From ab3b7a57f282253c321d57f7cd1381b303769d44 Mon Sep 17 00:00:00 2001 From: jfons Date: Fri, 12 Mar 2021 12:57:04 +0100 Subject: [PATCH] Fix visibility toggle for baked GridMaps (cherry picked from commit 809d88b925d440fef6cb9b6572315e365f91487e) --- modules/gridmap/grid_map.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index fa79cfc4a06..05c772fdb24 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -746,6 +746,10 @@ void GridMap::_update_visibility() { VS::get_singleton()->instance_set_visible(mi.instance, is_visible_in_tree()); } } + + for (int i = 0; i < baked_meshes.size(); i++) { + VS::get_singleton()->instance_set_visible(baked_meshes[i].instance, is_visible_in_tree()); + } } void GridMap::_queue_octants_dirty() {