summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-31 10:54:23 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-31 10:54:23 +0100
commit62689affc77266c5ec0dca8e35d87f73277ec00a (patch)
tree909c87689e75181758e96fd4bfa4376231d042c5
parenteedc4553b58d8f93be8297085f401fdb868b5725 (diff)
parent541b725190aead00f05211e873e0220310fe26d5 (diff)
Merge pull request #72427 from MinusKube/csg-polygon-path-bug
Don't generate CSGPolygon3D shape before the assigned path is inside tree
-rw-r--r--modules/csg/csg_shape.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 9cc3d0413d..13c7a8202c 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -558,7 +558,7 @@ void CSGShape3D::_notification(int p_what) {
set_collision_layer(collision_layer);
set_collision_mask(collision_mask);
set_collision_priority(collision_priority);
- _update_collision_faces();
+ _make_dirty();
}
} break;
@@ -1763,7 +1763,7 @@ CSGBrush *CSGPolygon3D::_build_brush() {
}
}
- if (!path) {
+ if (!path || !path->is_inside_tree()) {
return new_brush;
}