Hi,
There are several options, here is one that might work for you:
Basically you can override the contact added callback, and set the penetration depth to zero in the contact point. But also move the capsule manually so it doesn't penetrate. Make sure only to set the callback flag for the capsule:
Code: Select all
capsuleRigidBody->setCollisionFlags(staticBody->getCollisionFlags() | btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK);
Use the contact normal * penetration depth to move out the capsule manually.
For details on overriding the contact added callback, search for ContactAddedCallback in ConcavePhysicsDemo.cpp (ignore parts about friction)
Hope this helps,
Erwin
By the way, someone recently implemented this, so perhaps you get a more detailed answer from him later.