Browse Source

Setting visibility on GridMap now works. Closes #41374.

Continuing the work from f43a0ef3270737d2b526480ecb0f1337ece9e041,
It seems the maps visibility was not actually set and a flase value was propogated to the meshes
Trying to set the maps visibility directly (Using `set_visibility` causes the map to no longer to recieve visibility notifications, instead this approach was chosen

(cherry picked from commit fe52c6b0b7e21bbed1aaabe684714a9b78c23ba3)
Tomer Keren 4 years ago
parent
commit
3e4816efbd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/gridmap/grid_map.cpp

+ 1 - 1
modules/gridmap/grid_map.cpp

@@ -735,7 +735,7 @@ void GridMap::_update_visibility() {
 		Octant *octant = e->value();
 		Octant *octant = e->value();
 		for (int i = 0; i < octant->multimesh_instances.size(); i++) {
 		for (int i = 0; i < octant->multimesh_instances.size(); i++) {
 			const Octant::MultimeshInstance &mi = octant->multimesh_instances[i];
 			const Octant::MultimeshInstance &mi = octant->multimesh_instances[i];
-			VS::get_singleton()->instance_set_visible(mi.instance, is_visible());
+			VS::get_singleton()->instance_set_visible(mi.instance, is_visible_in_tree());
 		}
 		}
 	}
 	}
 }
 }