Page 1 of 1

Using Chipmunk2D for collisions detections only?

Posted: Fri Nov 29, 2013 1:57 pm
by aisman
Hello slembke,

I have read the next version of Chipmunk2D will supporting also collisions detections only.
My both questions:
1) Is that right?
2) Can you say when this version of Chipmunk2D will be release (round about of course)?

Thanks
aisman

Re: Using Chipmunk2D for collisions detections only?

Posted: Mon Dec 02, 2013 3:34 pm
by slembcke
So I've changed my mind on a collision only mode several times.

How you would do it in Chipmunk 6.x was to make rogue bodies with shapes on them. You would set up a default collision handler that returned false from the preSolve callback so collisions would do nothing by default. Specific collision handlers would also need to return false to avoid creating collisions. Then each frame you'd move the bodies to their new positions and call cpSpaceStep() to trigger the callbacks.

A collision detection only mode would work almost identically except that it would always act as though callbacks returned false. I'm not sure if it's worth adding it to Chipmunk when a documented example might work just as well. It needs to be explained either way.

Re: Using Chipmunk2D for collisions detections only?

Posted: Fri Dec 06, 2013 1:45 am
by aisman
@slembke,
Yes I belive it too.
An example added to the latest Chipmunk2D version (6.2.1) can help to understand how you mean it.

Thanks
aisman