Using Chipmunk2D for collisions detections only?

Official forum for the Chipmunk2D Physics Library.
Post Reply
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Using Chipmunk2D for collisions detections only?

Post 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
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Using Chipmunk2D for collisions detections only?

Post 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.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Re: Using Chipmunk2D for collisions detections only?

Post 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
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests