IgnoreCollision Function Q's

So I was planing on using it as such. The small objects in my game (fighters, bombers, ect) all have primitives on them. The big objects (space stations, battle cruisers) all have mesh colliders due to the size and complexity. This presents a problem if the battle cruisers are to collide with the space stations which they will, ther would be two mesh colliders colliding. So after having a chat with some people, I decided that I could use primitive(s) for the battlecruisers that the small ships would ignore using this function. All primitives on the battle cruisers would ignore a layer or tag I gave the smaller ships. I then talked to jon and he brought up a good point. He thought this might be very costly depending on how the function was implemented. Does it still find the collision, search through a list and ignore it? Basically I am curious to what the otee guys think, would this work alright or kill performance? How does this function operate?

Thanks as always, Bill

I think this is a reasonable way to do it. Shouldn’t have a visible performance impact.

Right now the only way to ignore collisions is Physics.IgnoreCollision. Which takes a pair of two colliders.

We will probably support layer based collision ignorance later on. Right now you have to mark all pairs of fighters/cruisers to ignore collisions. Should be easy enough to do using FindObjectsOfType at startup.

Thats what I wanted to know and also how I was planning on doing it.

Thanks Bill