Question about Chipmunk and groups
BlitzMax Forums/BlitzMax Programming/Question about Chipmunk and groups
| ||
Hi all :) have been working allot with Bruceys chipmunk wrapper lately, however... i have got stuck on a small problem. i need to link(joint) two bodys together, and then ofcourse i need them to Not collide, so i found the term 'groups' on the chipmunk help page(http://files.slembcke.net/chipmunk/chipmunk-docs.html): however, all it say is: "Groups: Groups filter out collisions between objects in the same non-zero groups. A good example of when groups would be useful is to create a multi-body, multi-shape object such as a ragdoll. You don’t want the parts of the ragdoll to collide with itself, but you do want it to collide with other ragdolls." now... i cant find any other information on what functions to use, or anything other even remotly related to groups in that page, and after some googeling and searching in these forums, i have to write and ask about it. any one who can cast some light over this? a small example perhaps? :-) tanx in advance :) |
| ||
I think you want to take a look at the methods CPShape.SetGroup() and CPShape.SetLayers(). Shapes in the same non-zero group do not generate collisions. (defaults to 0) Shapes only collide if they are in the same bit-planes/layers. (defaults to all 32 bit-planes) HTH :-) |
| ||
Woha, tanx allot m8, you are the man Brucey ;) and btw, I'm very happy with your sweet wrapper module! nice work :D |