diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 1caeddd8816..5e032c41bfb 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -545,15 +545,9 @@ Vector > Mesh::convex_decompose() const { ERR_FAIL_COND_V(!convex_composition_function, Vector >()); - Vector faces = get_faces(); - Vector f3; - f3.resize(faces.size()); - const Face3 *f = faces.ptr(); - for (int i = 0; i < f3.size(); i++) { - f3.write[i] = f[i]; - } + const Vector faces = get_faces(); - Vector > decomposed = convex_composition_function(f3); + Vector > decomposed = convex_composition_function(faces); Vector > ret;