I want to create a game like BubbleShooter and when i shoot a bubble (as u can see in the image) the Console shows a message with the colliders the bubble hit.
But i dont get why there are so many colliders when i only hit one bubble?
Thank you in advance
From what I can see. I would have to guess that your bubble objects. Are likely already in a collision state from the start. Or get bumped into eachother after the first collision.
IE: Your bubbles at the top already touch each other. Triggering OnCollisionEnter on all of them right from the get go. If you don’t get the onslaught of debug.log until you fire then likely your shooting ball is bumping your objects into each other. Not sure at which point you screenshot was taken.
Few things could fix this. Either give them enough spacing to not bump colliders. Or go into your project settings and modify your 3d physics options. Set it so all of the target bubbles are in one layer that doesn’t interact with itself. Then make sure your shooting ball is in a layer that does interact with the bubbles layer. Also you could check in your collision code if the collision was with another bubble, do nothing, else your shooting ball was the collision and delete both.
Best guess from what is here. Try your scripts in a scene with just one bubble. if your results are as you expect then likely you just need to make your bubbles not interact with each other.