Collision grouping

I have some green and blue balls, I want to get a callback when the green and blue balls collide, but the green and green balls collide without a callback, is there a way to achieve this effect? I don’t want to judge separately in the callback

Hello, you’ll have to filter the collisions in the callback.

Okay, but processing so many unnecessary things in the callback makes me think it is a waste of performance. It would be great if the callback could not be triggered

The collisions between the balls have to be processed in any case if you want them to physically respond to the collisions, so the events won’t make a big difference.

I will use 3,000 small balls instead of soldiers, and they will be killed when they collide. I will check the execution time of the callback function in this case, and whether the frame rate exceeds 60