Procedural Mesh Component Collision Baking/Custom Collision

Additionally you can create the mesh in PhysX without serialization, which brings around 20% speed up and should be used for real time cooking.

In general the usage changes from:

  1. PxCooking::cookTriangleMesh(const PxTriangleMeshDesc& desc, PxOutputStream& stream
  2. PxPhysics::createTriangleMesh(PxInputStream& stream);

To:
createTriangleMesh(const PxTriangleMeshDesc& desc, PxPhysicsInsertionCallback& insertionCallback)

Where insertion callback instance is retrieved from PxPhysics::getPhysicsInsertionCallback

Regards,
Ales