I'm trying to create a simulation where I need to check the collision between two meshes. I'm using BulletSharp.
For the moment I tried to insert the mesh both as BvhTriangleMeshShape:
Code: Select all
var localScaling = new Vector3((float)scale);
var _triangleMesh = CreateTriangleMesh(wavefrontModel.Indices, wavefrontModel.Vertices, localScaling);
var concaveShape = new BvhTriangleMeshShape(_triangleMesh, true);
Code: Select all
var tri = new TriangleIndexVertexArray(wavefrontModel.Indices, wavefrontModel.Vertices);
var g_tri = new GImpactMeshShape(tri);
g_tri.Margin = 0;
g_tri.UpdateBound();
g_tri.LocalScaling = new Vector3((float)scale);
No collision is currently detected. I tried to vary the scale and increase the stepSimulation but nothing has changed.
I know that collisions among meshes are not optimal but I don't need speed but precision and also I don't have to consider many objects.
How can I solve this problem?
Thanks in advance