[SOLVED] btGImpactMeshShape scrambled...
Posted: Sat Nov 11, 2017 10:39 pm
Hi!
It seems that Bullet Physics defines the vertices and triangles in a btTriangleIndexVertexArray in a way different from the way they are defined in Blender, so the mesh appears scrambled. For illustration, here below 3 cubes rendered as a btBoxShape and a cube rendered as a btGImpactMeshShape based on a btTriangleIndexVertexArray. The .obj cube mesh is exported from Blender and the same for all 4 cubes.
Thus the question, how to export a concave mesh from Blender, so its vertices and triangles can be loaded in Bullet Physics as a btTriangleIndexVertexArray to create a btGImpactMeshShape without the mesh being scrambled, any... silver bullet to do that???
Thanks!
It seems that Bullet Physics defines the vertices and triangles in a btTriangleIndexVertexArray in a way different from the way they are defined in Blender, so the mesh appears scrambled. For illustration, here below 3 cubes rendered as a btBoxShape and a cube rendered as a btGImpactMeshShape based on a btTriangleIndexVertexArray. The .obj cube mesh is exported from Blender and the same for all 4 cubes.
Thus the question, how to export a concave mesh from Blender, so its vertices and triangles can be loaded in Bullet Physics as a btTriangleIndexVertexArray to create a btGImpactMeshShape without the mesh being scrambled, any... silver bullet to do that???
Thanks!