add btDiscreteDynamicsWorld::createPredictiveContacts after discrete collision detection and add temporary contact manifolds, for the constraint solver.
This should improve 'ccd' handling when using world->getDispatchInfo().m_useContinuous = true;body->setCcdSquareMotionThreshold(...); body->setCcdSquareMotionThreshold(...) shoot smaller boxes (test) use yellow instead of orange for contact point normals tweak default erp and erp2 values, now split impulse is on by default (need to check it)
This commit is contained in:
@@ -534,7 +534,7 @@ void DemoApplication::setShootBoxShape ()
|
||||
{
|
||||
if (!m_shootBoxShape)
|
||||
{
|
||||
btBoxShape* box = new btBoxShape(btVector3(.5f,.5f,.5f));
|
||||
btBoxShape* box = new btBoxShape(btVector3(.15f,.15f,.15f));
|
||||
box->initializePolyhedralFeatures();
|
||||
m_shootBoxShape = box;
|
||||
}
|
||||
@@ -565,8 +565,8 @@ void DemoApplication::shootBox(const btVector3& destination)
|
||||
body->getWorldTransform().setRotation(btQuaternion(0,0,0,1));
|
||||
body->setLinearVelocity(linVel);
|
||||
body->setAngularVelocity(btVector3(0,0,0));
|
||||
body->setCcdMotionThreshold(0.5);
|
||||
body->setCcdSweptSphereRadius(0.9f);
|
||||
body->setCcdMotionThreshold(0.1);
|
||||
body->setCcdSweptSphereRadius(0.1f);
|
||||
// printf("shootBox uid=%d\n", body->getBroadphaseHandle()->getUid());
|
||||
// printf("camPos=%f,%f,%f\n",camPos.getX(),camPos.getY(),camPos.getZ());
|
||||
// printf("destination=%f,%f,%f\n",destination.getX(),destination.getY(),destination.getZ());
|
||||
|
||||
Reference in New Issue
Block a user