existenz35 / box2dweb

Automatically exported from code.google.com/p/box2dweb
0 stars 0 forks source link

ContactFilter ignores categories and maskbits #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set the contact filter for 2 bodies so that they are in the same group, but 
two different maskbits (should not collide)
2. b2ContactFilter has a hardcoded 'returns true' for should collide, exiting 
the function before the category <--> maskbits comparison occurs.

What is the expected output? What do you see instead?
Setting the categorybits & maskbits of a body should behave as it does in 
box2d/box2d-as3 

What version of the product are you using? On what operating system?
2.1a - 

Please provide any additional information below.

Original issue reported on code.google.com by onedayit...@gmail.com on 12 Sep 2011 at 2:28

GoogleCodeExporter commented 9 years ago
From section 6.2 in the box2D Manual 
(http://www.box2d.org/manual.html#_Toc258082972), right below the last grey box 
before section 6.3: "group filtering has higher precedence than category 
filtering". 

I interpret this so that members of a positive-number-group will always 
collide, and members of a negative-number-group will never collide, regardless 
of category and mask-bits.

Original comment by karl.ner...@googlemail.com on 1 Mar 2012 at 12:35