Continuous collision

Shazboots
Posts: 2
Joined: Thu Nov 05, 2009 11:24 pm

Continuous collision

Post by Shazboots »

I've been working on integrating Bullet and it seems like a very nice library, but one thing that I'm wondering about is the state of continuous collision detection in Bullet. I was under the impression bullet supported this, but when I tried to use a btContinuousDynamicsWorld I noticed the comment says not to use it because it isn't complete :|

Any idea how functional btContinuousDynamicsWorld is? Or if it will be completed anytime soon?

Thanks
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Continuous collision

Post by Erwin Coumans »

The continuous collision detection, the actual detection of the time of impact, should work reasonably well. There are queries for that, such as the convexSweepTest.
The btContinuousDynamicsWorld is about continuous collision _resolution_, using the results of CCD to prevent penetration (as far as possible), between dynamic objects.
Getting this to work is a significant amount of work, and we focus our resources on other areas at the moment.

If you only need continuous collision resolution for fast dynamic moving objects against the static world environment, then you can try using the btDiscreteDynamicsWorld and use:

Code: Select all


///only perform a CCD query when the motion in one timestep exceeds 1. units
	body->setCcdMotionThreshold(1.);

/// perform a CCD query using an embedded sphere of radius 0.2
///stop the object at the time of impact, reported by the 'convexSweepTest using that sphere and the static world environment
	body->setCcdSweptSphereRadius(0.2f);
Thanks,
Erwin