Showing posts with label filtering. Show all posts
Showing posts with label filtering. Show all posts

Friday, 11 January 2013

Collision filtering with Box2d



Having a lot of bodies in the level at the same time can significantly impact framerates. Especially collision processing is a big burden to process. Add to that the fact that it’s usually necessary for gameplay to not have all bodies collide (for instance, bricks flying from a building should not collide with the player but should collide with the terrain): a way to filter these collisions is a necessity. Luckily, Box2D has a way to do this.