Multiple Objects Collisions

Official forum for the Chipmunk2D Physics Library.
Post Reply
jemens
Posts: 1
Joined: Thu Jan 07, 2010 3:56 pm
Contact:

Multiple Objects Collisions

Post by jemens »

I'm looking at the best way to detect when : let say 4 objects collide simultaneously. Two is easy but not sure how to implement with 3 and more.

Any idea ?

thanks
Chris
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Multiple Objects Collisions

Post by slembcke »

This is a graph theory problem essentially. All of your objects that can collide are nodes of the graph, and all of the collisions are edges of the graph. What you want to do then is find the connected components of size 4 or greater.

http://en.wikipedia.org/wiki/Connected_ ... ph_theory)
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests