I start working on a simulation with the bullet library to prevent and avoid collisions. I use bullet version 2.82.
I have some questions regarding collision margins.
In the manual, I found the following observation:
Which I suppose that refers to the margin defined in btCollisionMargin.hBy default, this collision margin is set to 0.04, which is 4 centimeter if your units are in meters (recommended).
Code: Select all
///The CONVEX_DISTANCE_MARGIN is a default collision margin for convex collision shapes derived from btConvexInternalShape.
#define CONVEX_DISTANCE_MARGIN btScalar(0.04).
In the basic demo of the bulletExampleBrowser, we instantiate a bunch of box shapes with 20 centimeters.
Code: Select all
btBoxShape* colShape = createBoxShape(btVector3(.1, .1, .1));
Why the boxes are not colliding with a small gap or penetrating of 4 cm?
I tried different margins with colShape.setMargin(x), and it doesn't change anything.
Thanks.