From da2daebbb8503ffe56ec53f4a28ff33867cbf368 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 13 Oct 2023 19:27:40 +0200 Subject: [PATCH] Fixed processing collision shapes in PropDataCollisionObject. --- modules/props/props/prop_data_collision_object.cpp | 5 +++++ modules/props/props/prop_data_static_body.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/props/props/prop_data_collision_object.cpp b/modules/props/props/prop_data_collision_object.cpp index 56b84e290..b9b202574 100644 --- a/modules/props/props/prop_data_collision_object.cpp +++ b/modules/props/props/prop_data_collision_object.cpp @@ -74,12 +74,17 @@ void PropDataCollisionObject::add_collision_shape(const Transform &p_transform, ShapeEntry e; e.transform = p_transform; e.shape = p_shape; + _shapes.push_back(e); + + property_list_changed_notify(); } void PropDataCollisionObject::remove_collision_shape(const int p_index) { ERR_FAIL_INDEX(p_index, _shapes.size()); _shapes.remove(p_index); + + property_list_changed_notify(); } bool PropDataCollisionObject::_processor_evaluate_children() { diff --git a/modules/props/props/prop_data_static_body.cpp b/modules/props/props/prop_data_static_body.cpp index 1a1477d37..d2c0243c1 100644 --- a/modules/props/props/prop_data_static_body.cpp +++ b/modules/props/props/prop_data_static_body.cpp @@ -66,7 +66,7 @@ void PropDataStaticBody::_processor_process(Ref prop_data, Node *node, c->set_collision_layer(sb->get_collision_layer()); c->set_collision_mask(sb->get_collision_mask()); - processor_process_collision_objects(node, Transform()); + c->processor_process_collision_objects(node, Transform()); prop_data->add_prop(c); }