I'm currently adding Bullet soft bodies to Dynamica as a personal learning exercise (I'll release the code when it's done, along with any documentation that comes out of it). I've made good progress but I'm currently blocked by the fact that soft bodies do not seem to interact with rigid bodies at all inside the plugin. Soft bodies do collide with each other, but not rigid bodies. I was wondering if anyone more familiar with the code might know any "obvious" reasons why this would happen. My soft body object (class bt_soft_body) construction code looks something like this:
I've played with some of the ideas in the second URL to no avail (but have not tried changing the collision margins yet). Other posts suggest that a problem may arise if a rigid body's position is set either at constructor time or if it is updated later - but which one of these is "correct" is not clear to me. I will try playing with the way object positions are set but there's no cause for optimism so far - hopefully I won't have to halt development .
It looks like I've managed to fix this. I changed the soft-body creation code to match that in the demo bunny constructor exactly. It now looks like this:
I've also updated to the latest Bullet source (as of yesterday). Soft bodies, passive rigid bodies, and active rigid bodies now all seem to be interacting correctly .
The "fix" I posted before does not allow soft bodies to interact with each other. After further experimentation I found that the original cause of my problems was the btSoftBody::fCollision::CL_RS flag. When this is added soft bodies actually stop interacting with rigid bodies entirely (I'm guessing that this interacts badly with some other setting somewhere else), and as a result I cannot seem to use soft body - rigid body cluster collisions, though other collision detection methods do work (albeit imperfectly). So I added the cluster generation code along with the btSoftBody::fCollision::CL_SS flag back in. Things seem fine now except that soft-bodies tend to pass through planes after prolonged contact.