ymobe / rapanui

High level API for MOAI framework
185 stars 48 forks source link

categoryBits , maskBits and groupIndex in rapanui #133

Closed homatenbeo1990 closed 11 years ago

homatenbeo1990 commented 11 years ago

how to use categoryBits , maskBits and groupIndex ????

example : object A,B,C A and B : group 1 - ( A and B can collide with each other but ca'nt collide C )

Any help much appreciated . i'm sorry, i'm poor english. Thanks. Homatenbeo

MattiaFortunati commented 11 years ago

Hi Homatenbeo, I'll redirect you to the relative sample: https://github.com/ymobe/rapanui/blob/rapanuidev/rapanui-samples/physics/rn-physics-filters.lua

homatenbeo1990 commented 11 years ago

Hi MattiaFortunati I see your example, but it's still not exactly what I was wondering .

I have C, groupindex = -1 A and B do not put groupindex. problem : C still collides with A and B.

Any help much appreciated . i'm sorry, i'm poor english. Thanks. Homatenbeo

MattiaFortunati commented 11 years ago

You should check box2d documentation. Also, I found this: http://stackoverflow.com/questions/936935/box2d-collision-groups

homatenbeo1990 commented 11 years ago

Hi MattiaFortunati Thanks for share ^^!