Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | jujumumu |
I am doing this all in gdnative with c++. When I make a arraymesh then call create_convex_shape on it I get an error which is “error: member access into incomplete type ‘godot::Shape’”
A simple version of the code is below:
ArrayMesh *amesh = ArrayMesh::_new();
Array vertexarray;
vertexarray.append(Vector3(0,1,0));
vertexarray.append(Vector3(0,0,1));
vertexarray.append(Vector3(1,0,0));
Array arrays;
arrays.resize(ArrayMesh::ARRAY_MAX);
arrays[ArrayMesh::ARRAY_VERTEX] = vertexarray;
amesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, arrays);
amesh->create_convex_shape();
I get the same error. How do I fix this?