Hello,
I'm actually working on a platformer game, but I conclused that making my own physics system is pointless, so after quick brainstorm I choosed Box2D. After implementing it I met following problem:

I want to make platforms, that are positioned lower than player to collide with him, but those, which are higher should be transparent (and when he'll jump on them, they will become solid). On this image:
1 shouldn't collide with player,
2 should collide with player (because it's lower than player's highest part - head)
3 should collide with player (because it's underneath him)
I know of filtering, but it provides only 16 groups (so I wouldn't be able to make map higher than 16 cells (one cell = 64px, and so are platforms). I can reassign platforms to two groups (upper and lower) every each frame or player movement, but I think it will be helluva slow, and what if there will be for example 10 players on map? 20 groups won't fit. How can I achieve this with Box2D, or any other engine?
I'm actually working on a platformer game, but I conclused that making my own physics system is pointless, so after quick brainstorm I choosed Box2D. After implementing it I met following problem:

I want to make platforms, that are positioned lower than player to collide with him, but those, which are higher should be transparent (and when he'll jump on them, they will become solid). On this image:
1 shouldn't collide with player,
2 should collide with player (because it's lower than player's highest part - head)
3 should collide with player (because it's underneath him)
I know of filtering, but it provides only 16 groups (so I wouldn't be able to make map higher than 16 cells (one cell = 64px, and so are platforms). I can reassign platforms to two groups (upper and lower) every each frame or player movement, but I think it will be helluva slow, and what if there will be for example 10 players on map? 20 groups won't fit. How can I achieve this with Box2D, or any other engine?
