While working on a project we have found that the btSphereSphereCollisionAlgorithm causes a crash when two spheres are in the same position.
I've patched the following code to include a check
Code: Select all
btVector3 diff = col0->getWorldTransform().getOrigin()- col1->getWorldTransform().getOrigin();
btScalar len = diff.length();
btScalar radius0 = sphere0->getRadius();
btScalar radius1 = sphere1->getRadius();
Code: Select all
btVector3 diff = col0->getWorldTransform().getOrigin()- col1->getWorldTransform().getOrigin();
btScalar len = diff.length();
if(len==0.0f)
return;
btScalar radius0 = sphere0->getRadius();
btScalar radius1 = sphere1->getRadius();
Thank you a million for bullet it is absolutely awesome!
-Sean Tasker