Hello,
In my project I have static scene objects that are dynamically created and merged into a single mesh at runtime. To add physics collision, I am using a BvhTriangleMeshShape. The merged mesh has multiple different materials, thus multiple subgeometries.
However, BvhTriangleMeshShape ignores all but the first subgeometry
var indexData : Vector.<uint> = mesh.geometry.subGeometries[0].indexData;
var vertexData : Vector.<Number> = mesh.geometry.subGeometries[0].vertexData;
I tried to fix this but it seems it is more complicated than it looks and my meagre efforts have failed
It would be great to have this fixed as my current workaround is to merge the scene objects into a temporary second mesh without a texture (thus only 1 subgeometry), and use this temporary mesh to create the shape. Obviously not a very efficient way of doing things.