Hello All,
I’m making a dynamic landscape made of cube faces but I’m having some trouble removing cubes from the mesh.
Currently I’m completely redrawing the entire procedural mesh whenever a cube is removed. Currently i have the whole landscape as section 0. Is there a more efficient way of updating the mesh?
void UMyProceduralMeshComponent::CreateMesh()
{
CreateMeshSection_LinearColor(0, Vertices, Triangles, Normals, UVs, Colors, Tangents, true);
}
void UMyProceduralMeshComponent::DestroyMesh()
{
Normals.Empty();
Colors.Empty();
Vertices.Empty();
Tangents.Empty();
UVs.Empty();
ClearMeshSection(0);
}