Fixed processing collision shapes in PropDataCollisionObject.

This commit is contained in:
Relintai 2023-10-13 19:27:40 +02:00
parent f7ecfb412a
commit da2daebbb8
2 changed files with 6 additions and 1 deletions

View File

@ -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() {

View File

@ -66,7 +66,7 @@ void PropDataStaticBody::_processor_process(Ref<PropData> 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);
}