ignore collisions Best Practices question

If I want a shield around a ship to ignore the ship (the collider is marked as trigger since i don’t really want the shield to stop objects unless there going very very fast).

I want the shield which is a gameobject with a collider to ignore its parent as a collision object.

I don’t think Layer Based collision is good for this because every ship in the scene would have to have a special layer. If all ships in the scene were on the same layer than no shield would ever be aware of another ship entering it’s collider even at high speed. I Might later on want to be able to use the shield for ramming or some method through which you can for a short period allow the shield to behave in collider like ways and be able to interact with other ships.

I also don’t know though if a phyics.ignoreCollision(ship,shield) is a good idea
because it says if the object is disabled the ignorecollision must be called again.

Is the ignoreCollision the best practice to do this (in which case I guess i just have to ensure that shield.enable ends up always being followed by a physics.ignoreCollision call).

One possible approach:

Throw the ship bodies onto one layer, the shields on another and use the collision matrix to disable ship to ship and shield to shield collision, thus only allowing your trigger calls to happen between ships and shields. Use ‘Physics.IgnorCollision’ to disable collision calls between a ship and its own shields each time you enable its shield’s collider.

Physics Matrix info here