So you want all the balls to collide with each other but only one ball to collide with the paddle unless you move it, right?
If so then this should work:
Add this line to your main ball's fixture definition:
Code:
ballShapeDef.filter.categoryBits = 0x0002;
and the following lines to the paddle's fixture definition:
Code:
fd.filter.categoryBits = 0x0002;
fd.filter.maskBits = 0xFFFF & ~0x0004;
fd should be a b2FixtureDef (I don't know what it's called in your code)
and to the other balls' fixture definition add:
Code:
ballShapeDef.filter.categoryBits = 0x0004;
This should make sure only the main ball can collide with the paddle but all balls collide with each other. If you want the main ball to not collide with the paddle do this:
in your .h file add:
Code:
b2Fixture* fixture;
and in the .mm file you should have:
Code:
fixture = _body->CreateFixture(&ballShapeDef);
Now whenever you need to stop collision with the paddle add this:
Code:
b2Filter filter = fixture->GetFilterData();
filter.categoryBits = 0x0002;
fixture->SetFilterData(filter);
or filter.categoryBits = 0x0004; to resume collision.