Ensure balls collide with the shield

This commit is contained in:
Matt Low 2018-11-15 14:53:14 +04:00
parent 9eac3353b6
commit 998286de8d

View File

@ -84,7 +84,9 @@ public class Ball extends Entity implements PhysicsBody, CollisionListener {
ballFixture.density = 1f; ballFixture.density = 1f;
ballFixture.filter.categoryBits = EntityType.BALL; ballFixture.filter.categoryBits = EntityType.BALL;
ballFixture.filter.maskBits = EntityType.BOUNDARY | EntityType.BRICK | EntityType.PADDLE | EntityType.POWER_UP; ballFixture.filter.maskBits = EntityType.BOUNDARY | EntityType.BRICK
| EntityType.PADDLE | EntityType.POWER_UP
| EntityType.SHIELD;
body = state.world.createBody(ballBody); body = state.world.createBody(ballBody);
body.createFixture(ballFixture); body.createFixture(ballFixture);