Changes since last RC:
* Fixes for the Bullet 2.76/2.77 build issues noted previously.
* Adds CreationRecord::_margin to set the collision shape margin for convex
tri mesh and convex hull shapes. Also hardcodes a margin of 0.0 for convex hull
shapes created by the LaunchHandler. This fixes an issue in the slider example;
if you put a teapot on top of the nightstand, it floated a couple inches above
the surface. This is now fixed.
* Many changes to the slider example... You can now yank the drawer out of the
nightstand and it breaks the slider constraint. Also, we now use a custom
osgShadow technique to improve behavior and appearance for this demo.
I think we're very close to a final release at this point, so I'm just going to
let it sit for a few days while people try it out. Please test and provide feedback.
Thanks!
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
Unfortunately it looks like DebugDrawCallback is private to btCollisionWorld's
implementation, so the only way to override this would be to derive a class from
btCollisionWorld (or btDynamicsWorld or btDiscreteDynamicsWorld). Seems like
kind of a heavyweight workaround.
I've seen the effect your describe, and I agree it's ugly and annoying. However,
it's not an osgBullet-specific issue. Creating the same complexity collision
shape from any other source would still create the same pin-cushion result. Too
bad Bullet doesn't have a DBG flag to disable normals.
Note that this effect might be an indication that your collision shape has too
many triangles. I've heard the Bullet folks say that you should really have no
more than a few dozen triangles in a collision shape for maximum efficiency.
osgBullet v2.0 lets you set a triangle reduction in the CreationRecord to create
a collision shape with fewer triangles, so you could give that a try:
CreationRecord* cr; ...
cr->_reductionLevel = CreationRecord::AGGRESSIVE;
This will create a collision shape with fewer triangles, but leaves your visual
model unchanged. In many cases, the difference in the physics behavior isn't
noticeable.