Hey, I'm in need of some way to ignore a large amount of objects at instantiation. Is there some way to set layers of collision in Unity such that an object can ignore a specific collision layer?
More specifically, my game requires a large amount of bullet objects. I am looking for some way for these bullets to collide with most of the objects in the scene but ignore the rest. Mostly I need the bullets to ignore other bullets in the scene. The only way I know of to do this is to use the IgnoreCollision() method, but there can be dozens or even hundreds of bullets in the scene at one time. I need a computationally quick way to ignore collisions with the rest of these bullets when a new bullet is instantiated.
I did some investigating and it seemed like this was a known requested feature some time ago, but I'm hoping there is some way to do this now. So, can anyone think of any way to do this other than somehow obtaining all of the bullets in the scene and iterating through all of them for each new bullet, ignoring collisions one at a time?