How can I enable Continuous Collision Detection (CCD) in Bullet Physics?

  • 6
    \$\begingroup\$ The Bullet Physics SDK contains a CCD physics demo in Demos/CcdPhysicsDemo/CcdPhysicsDemo.cpp. Have you tried taking a look at the code to learn what they do? Engine demos exist for a reason. ;) \$\endgroup\$ – doppelgreener May 5 '11 at 7:11

You need to enable CCD per object as described in Bullet wiki or Panda3D Manual: Bullet Continuous Collision Detection. Basically you need to set body->setCcdMotionThreshold(...); and body->setCcdSweptSphereRadius(0.2f);

  • \$\begingroup\$ So if I'm shooting bullets, which are very small, this value need to be quite small, isn't this a disadvantage ? \$\endgroup\$ – jokoon Feb 10 '13 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.