I am busy updating our version of Newton to be inline with the latest on Github. Whilst running through our tests, I noticed that previously the collisions for a static mesh were working fine, but since updating they are being missed on areas of the static mesh where triangles join. Our test involves a simple ndShapeStatic_bvh created using 5 vertices and 4 triangles. I then drop a cube on the mesh, the collisions work fine when dropping the cube on a full triangle, but not where two triangles join. Sometimes the collisions work fine on the join, other times it does not. It seems to be related to the size and starting height of the cube.
If the cube is already on the static mesh and I move it over to the area where the triangles join, then the contacts work fine and it does not fall through the static mesh.
I noticed that in
- Code: Select all
ndInt32 ndContactSolver::ConvexContactsDiscrete()
- Code: Select all
PruneContacts
- Code: Select all
ndInt32 ndContactSolver::Prune3dContacts(const ndMatrix& matrix, ndInt32 count, ndContactPoint* const contactArray, ndInt32 maxCount) const
This function has a change in it that was not there in the previous version that we had. The part of the function in the
- Code: Select all
#if 0
- Code: Select all
#if 1
I tried reproducing this in the sandbox, but it seems to work fine there, which indicates that I may be doing something wrong on my side, but I cannot seem to figure out what it is. Do you perhaps know what I may be doing wrong?