Howto - 2 bouncing balls hit the floor but not each other

Do you know the game “bubble trouble” ? They have 2 bouncing balls that hit the floor, but they do not hit one another.

How can I achieve the same in unity3d?
If I mark the collider as “trigger” then the ball will not hit the floor.
If I don’t - the balls will collide with one another.

1 Answer

1

You can use collision layers to do this (for instance).

Just put your balls on the same layer (e.g. balls) and then disable collision for layer option: balls - balls.

I knew unity had a simple solution for this :) IgnoreCollision, what a fantastic idea!