Detection of collision between elements from same array only works sometimes

Oh wow I think it is working now. So, as I suspected, what was happening was that the program was trying to do too many things at the same time and it wasn’t fast enough?

I think your solution didn’t come to mind because I was thinking that I had to have the circle 0 counted in the second loop, but just now I understood that if I’m comparing int=0 with k=1, comparing int=1 with k=0 would be the same, am I right?

EDIT: oh and with your solution 1 won’t be compared with 0 and 1, 2 with 0, 1 and 2, etc. cool!

Thank you so much!

1 Like