Fix CollisionObject3D Gizmo not updated after calling shape_owner_* functions

(cherry picked from commit 80a488a242)
This commit is contained in:
jsjtxietian 2023-11-08 17:50:20 +08:00 committed by Yuri Sizov
parent a092b1aa38
commit 5376aea688
1 changed files with 3 additions and 0 deletions

View File

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