Qt Quick 3D Physics Cooking
When using a mesh as a collision shape it needs to be processed and converted into a data format for efficient collision detection. This is referred to as 'cooking'. There are three shape types that need to be cooked before they can be used, namely ConvexMeshShape, TriangleMeshShape and HeightFieldShape. The cooking happens automatically on the first frame of the simulation when using any of these shapes. This cooking can incur a noticeable performance cost so to enable faster loading times it is possible to store the cooked meshes in a cache directory on disk. By setting the QT_PHYSICS_CACHE_PATH environment variable to a directory of choice it will be used for caching. When the application runs for the first time all used meshes will be cooked and stored on disk. The following times the application runs the cooked meshes will be read from disk instead of being cooked.