[=ScottMG;240912]
I’d still like to know how to automatically generate some sort of convex decomposition.
[/]
Oh yeah, i’m sorry I forgot all about the Collision Elements in physics objects, I could have saved you a lot of time. Galaxy man is correct though, for a naive convex collision just pass your vertice list to a FKConvexElem structure and add it to the collision elements. There are lots of ways to simplify meshes to reduce the collision mesh down but the one that UE4 has built in right now (Simplygon) requires a license I think.
I’m using this for the convex elem, but I don’t have to scale my mesh any with what I’m doing either.
FKConvexElem el;
for (int i = 0; i < VoxelMeshVerticesMain.Num(); i++)
{
el.VertexData.Add(VoxelMeshVerticesMain*.Position);
}
ModelBodySetup->AggGeom.ConvexElems.Add(el);