Kaynağa Gözat

Fix CollisionObject3D Gizmo not updated after calling shape_owner_* functions

(cherry picked from commit 80a488a24271a860aa0b79fb2e83569bf8d49942)
jsjtxietian 1 yıl önce
ebeveyn
işleme
ce34a9b9a1
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3 0
      scene/3d/collision_object_3d.cpp

+ 3 - 0
scene/3d/collision_object_3d.cpp

@@ -621,6 +621,7 @@ void CollisionObject3D::shape_owner_add_shape(uint32_t p_owner, const Ref<Shape3
 	total_subshapes++;
 
 	_update_shape_data(p_owner);
+	update_gizmos();
 }
 
 int CollisionObject3D::shape_owner_get_shape_count(uint32_t p_owner) const {
@@ -684,6 +685,8 @@ void CollisionObject3D::shape_owner_clear_shapes(uint32_t p_owner) {
 	while (shape_owner_get_shape_count(p_owner) > 0) {
 		shape_owner_remove_shape(p_owner, 0);
 	}
+
+	update_gizmos();
 }
 
 uint32_t CollisionObject3D::shape_find_owner(int p_shape_index) const {