We are trying to determine the distance (a scalar, double) between two objects' surfaces in Bullet. We are new to the Bullet engine, and we've been looking into the demo projects, but couldn't find any good examples.
The closest we have come to implementing this is using the following:
btManifoldPoint& pt = contactManifold->getContactPoint(j);
double dist = pt.getDistance();
But where do we get the contactManifold object? (We're not even sure this is the right approach.)
We want to calculate distance when a key is pressed, so this is done in the specialKeyboard() function, a function in the Bullet demo framework.
Can anyone provide us with a clear, simple example?