Fix null debug_shape being updated when CollisionObject3D's transform changed

This commit is contained in:
jsjtxietian 2024-05-24 12:56:20 +08:00
parent daa81bbb7d
commit 2546dada75

View File

@ -439,6 +439,9 @@ void CollisionObject3D::_on_transform_changed() {
}
const ShapeData::ShapeBase *shape_bases = shapedata.shapes.ptr();
for (int i = 0; i < shapedata.shapes.size(); i++) {
if (shape_bases[i].debug_shape.is_null()) {
continue;
}
RS::get_singleton()->instance_set_transform(shape_bases[i].debug_shape, debug_shape_old_transform * shapedata.xform);
}
}