4

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

doppelgreener
  • 7,184
  • 7
  • 42
  • 68
Eonil
  • 959
  • 9
  • 24
  • 7
    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. ;) – doppelgreener May 05 '11 at 07:11

1 Answers1

3

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);

msell
  • 5,848
  • 1
  • 28
  • 41
  • So if I'm shooting bullets, which are very small, this value need to be quite small, isn't this a disadvantage ? – jokoon Feb 10 '13 at 21:41
  • @msell can you please elaborate what the params of this are? I have't found anything about param values in docs. Can you explain them? Thanks! – nutella_eater Nov 24 '23 at 15:30