top of page

ObjectiveChipmunk CpAbsorb

Ian Fan Jan 2012



Target:

Set a lots of ChipmunkCircleShape absorb each other while two of them are touching.



Sample Code:

https://github.com/IanFan/CpAbsorb

 

Step:

 

1. Set ChipmunkSpace, ChipmunkMultiGrab, ChipmunkDebugLayer as usual.


2. Set A lot of ChupmunkCircleShape in the space.


3. Set Handler to detect while two of them are touching.

4. Set Absorb math rule to make the bigger one absorb the smaller one.

 

Further Link:

 

1. Searching.

bottom of page