In my project I’m making great use of ArrayMeshes. But now I want to use blendshapes, however, I don’t understand how they are supposed to be used. And I cannot really find examples of them online.
func generate():
var square_mesh := square_array()
var triangle_mesh := triangle_array()
var a_mesh := ArrayMesh.new()
a_mesh.add_blend_shape("Triangle Shape")
a_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, square_mesh, [triangle_mesh])
mesh = a_mesh
However, this results in this error:
ERROR: Blend shape format must match the main array format for Vertex, Normal and Tangent arrays.
ERROR: scene/resources/mesh.cpp:1825 - Condition “err != OK” is true.
What happens if you use the already properly formatted array? You get a different error:
ERROR: Unable to convert array index 2 from “Nil” to “Array”.
ERROR: scene/resources/mesh.cpp:1819 - Condition “p_blend_shapes.size() != blend_shapes.size()” is true.
Tried that too, you can find my attempt here. I’m not too familiar with how tangents work, but it spits out the same error again:
ERROR: Blend shape format must match the main array format for Vertex, Normal and Tangent arrays.
ERROR: scene/resources/mesh.cpp:1825 - Condition “err != OK” is true.