Generate Procedural Mesh

Procedural Mesh Generation/Dynamic/PhysX

After a bunch of debugging through the engine I’ve come to a simple conclusion:

Moveable (Dynamic/Physics) actors cannot use meshes for collision. They must use spheres, boxes, sphyls (I assume that’s a capsule) or (convex decomposition meshes?).


AddSpheresToRigidActor(PDestActor, RelativeTM, MinScale, MinScaleAbs, NewShapes);
AddBoxesToRigidActor(PDestActor, RelativeTM, Scale3D, Scale3DAbs, NewShapes);
AddSphylsToRigidActor(PDestActor, RelativeTM, Scale3D, Scale3DAbs, NewShapes);
AddConvexElemsToRigidActor(PDestActor, RelativeTM, Scale3D, Scale3DAbs, NewShapes);

It looks to me like this is a PhysX library limitation, not UE4. (The warning I cited above comes from calling PxShape::setFlag(eSIMULATION_SHAPE, true)).

This leads me back to another question: Is the code to create a convex decomposition mesh available at runtime? Anyone have an example?