Here is an Exeltool which calculates the Masks according to the categories to which the single category shall collide.
Add your description in column A and put a '1' where the category should collide with.
Transfer the Category Bit and the Mask to the Tile properties or the programmed version:
And according to (the Box2D Manual):
So, when you fill it then start from the left to right until you reach the yellow cell, then go down. The upper triagle will be changed automatically.
The Sheet is password protected with an empty password just to save it from an intentionally changement of the formulars behind.
Add your description in column A and put a '1' where the category should collide with.
Transfer the Category Bit and the Mask to the Tile properties or the programmed version:
B4X:
Fire.Body.FirstFixture.SetFilterBits( 16, 65527 )
B4X:
bool collide = (filterA.maskBits & filterB.categoryBits) != 0 && (filterA.categoryBits & filterB.maskBits) != 0;
For a collision to happen: (FixtureA.MaskBits & FixtureB.CategoryBits) <> 0 AND (FixtureA.CategoryBits & FixtureB.MaskBits) <> 0
So, when you fill it then start from the left to right until you reach the yellow cell, then go down. The upper triagle will be changed automatically.
The Sheet is password protected with an empty password just to save it from an intentionally changement of the formulars behind.
Attachments
Last edited: