Avoid using restitution for ccd motion clamping. Restitution for fast moving objects should be handled by btDiscreteDynamicsWorld::createPredictiveContacts
(make sure to merge islands based on those predictive contacts too, added some check in the solver) This fixes Issue 356. Use same solver settings for AllBulletDemos Make sure to embed the setCcdSweptSphereRadius inside the actual collision shape (for shoot box)
This commit is contained in:
@@ -70,7 +70,7 @@ void btContactConstraint::buildJacobian()
|
||||
|
||||
|
||||
|
||||
//response between two dynamic objects without friction, assuming 0 penetration depth
|
||||
//response between two dynamic objects without friction and no restitution, assuming 0 penetration depth
|
||||
btScalar resolveSingleCollision(
|
||||
btRigidBody* body1,
|
||||
btCollisionObject* colObj2,
|
||||
@@ -93,7 +93,7 @@ btScalar resolveSingleCollision(
|
||||
btScalar rel_vel;
|
||||
rel_vel = normal.dot(vel);
|
||||
|
||||
btScalar combinedRestitution = body1->getRestitution() * colObj2->getRestitution();
|
||||
btScalar combinedRestitution = 0.f;
|
||||
btScalar restitution = combinedRestitution* -rel_vel;
|
||||
|
||||
btScalar positionalError = solverInfo.m_erp *-distance /solverInfo.m_timeStep ;
|
||||
|
||||
Reference in New Issue
Block a user