There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?

1

Closed

MobileMesh wrapped in compound problem

description

I have been tracking down a problem with mobilemeshes "sticking" to other meshes and generally a bad behavior. (i am using the latest version 92b2ac9a73a4)

The problem appears when two MobileMesh shaped that are wrapped in a compoundbody, collide with each other.

I was able to reproduce it in a modified MobileMeshDemo.cs (attached).
Start the demo and use mouse drag to throw the inner body around and it will stick on the outer body. It may also start shaking and you probably will not be able to grab it with the mouse anymore.
(You can throw it on the 'roof' and it will stick on it)

file attachments

comments

This appears to be expected behavior for MobileMeshSolidity.DoubleSided. It's very easy for a triangle of one mesh to be caught behind the triangle of the other mesh, and the generated contacts will fight separation.

Theoretically, a perfect CCD implementation could stop that from happening, but the approximate CCD in BEPUphysics is not strict enough.

The recommended solution is to use one of the one-sided MobileMeshSolidity modes instead. For example, if each mesh's MobileMeshSolidity is set to Counterclockwise (as it was in the original demo), the stickiness goes away.