Will Chipmunk support continuous collision in future updates?

Hi I have posted a thread few days ago Dynamic passes Static Body if velocity is high, but still I haven’t solved my problem. The last thing I did is I to make the bodies bigger, but the result is undesirable.

I know I answered in that other thread, and must’ve not solved your problem.

If you’re looking for out-of-box solution you’ll have to wait a while or help integrate the new chipmunk version into the engine (assuming it supports CCD well enough), or integrate Box2D yourself.

If your fast objects are small (e.g. bullets) then you should be able to effectively just need to check for collisions for your bodies with high velocity using the ray (line segment) from original position to new position against all the possible colliding objects (walls). If they’re larger you’ll have to do a polygon sweep over that same ray instead of just doing a simple line intersection test.

Are you trying to do this without writing custom code?

The problem is known:
http://howlingmoonsoftware.com/wordpress/simple-swept-collisions/


https://chipmunk-physics.net/forum/viewtopic.php?f=1&t=2149

http://chipmunk-physics.net/release/ChipmunkLatest-Docs/

Chipmunk allows fast moving objects to overlap, then fixes the overlap over time. Overlapping objects are unavoidable even if swept collisions are supported, and this is an efficient and stable way to deal with overlapping objects. The bias value controls what percentage of overlap remains unfixed after a second and defaults to ~0.2%. Valid values are in the range from 0 to 1, but using 0 is not recommended for stability reasons. The default value is calculated as cpfpow(1.0f - 0.1f, 60.0f) meaning that Chipmunk attempts to correct 10% of error ever 1/60th of a second. Note: Very very few games will need to change this value.

Edit: just offering search results to hopefully help guide you onto the right solution space
http://www.blitzbasic.com/Community/posts.php?topic=77627

1 Like

Thanks, I’ll just wait for it to be implemented. For now I’ll research further on the things that you stated.

In case you want to look into this more or not use a physics engine instead writing your own collision code. Here’s another approach essentially writing collision detection from scratch using Minkoski Sums with convex shapes. Possibly what the physics engines are using internally.


https://hero.handmadedev.org/jace/guide/

  • check out day 48 and 50 for the collision coding/discussion