Making progress with my first game, but I have a feeling I have something set up wrong. My ‘balls’ have a physics texture applied so they are '‘Bounciness 1 and Friction 0’ but when they come in contact with a square, the on collision event is fired way too many times. It should substract 1 per contact on the block, but it is doing like 15-20!
Also the ball is overlapping the square, but my collision radius perfectly covers the white ball.
Thanks
The firing multiple times was because I had hidden game balls colliding, the instantiations did not have the proper sprite for some reason.
They were actually firing too fast and all stacked up lol
A useful trick you can use to help you sometimes is to go into “Edit > Project Settings > Physics 2D > Gizmos” and turn on “Always Show Colliders” and/or “Show Collider Contacts”. This way you’ll see all the colliders irrelevant of whether you’ve got them selected or not or whether they are rendering anything. Also, the contacts are shown using small arrows. You can also configure the colours here to something that might be easier to see for you.
Hope this helps.
1 Like