瀏覽代碼

Fix CSGShape not updating on changing visibility

Hiding CSGShape should force the CSG operation to skip it which is intented
behaviour according to how CSGBrush is created for each shape.
Andrii Doroshenko (Xrayez) 6 年之前
父節點
當前提交
095f472a0b
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      modules/csg/csg_shape.cpp

+ 7 - 0
modules/csg/csg_shape.cpp

@@ -531,6 +531,13 @@ void CSGShape::_notification(int p_what) {
 		}
 		}
 	}
 	}
 
 
+	if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
+
+		if (parent) {
+			parent->_make_dirty();
+		}
+	}
+
 	if (p_what == NOTIFICATION_EXIT_TREE) {
 	if (p_what == NOTIFICATION_EXIT_TREE) {
 
 
 		if (parent)
 		if (parent)