Can you make a ball not hit other balls? (circle colliders)

Right now I have a simple pong game and am trying to make a power up that duplicate balls which works perfectly fine up to the point where the balls hit each other and all the physics go haywire. I want the balls to act like a breakout game where the balls can’t hit each other but can still hit the paddles just fine. Is there a way to do that?

What you want to do is use layers and the Physics2d (or simply Physics) matrix.

First, add a layer called “Ball” to your ball prefab:

Then, go to the Edit -> Project Settings -> Physics 2D panel and uncheck the checkmark for the Ball/Ball case:

51413-layer2.png

And you are set! What this matrix does is basically telling unity if you want collisions to happen between 2 layers or not.