How is it best to handle multiple layered colliders?

I am building a 2d spaceship game, where the ships have shields. I have the basic colliders set up, but now I am hitting a snag with shields. I’d like to have incoming objects strike the shields (if they are functioning and up), otherwise just strike the ship.

If a ship with shields up bumps into another ship with shields up, I want to have a collision. Currently, the first ship’s shield will collide with the second ship, and prevent the second ship’s shields from coming into contact with the first ship.

I think I might need to put a 2dRigid body on the ship shields (which is a child of the parent ship) in order to get the shields to respect each other. If I do that, I need to figure out how to turn off the rigid body if/when shields go down for a particular ship.

Does anyone have any suggestions of a better way to do this?

Why don’t you just set the shields to collide with each other?

I don’t recommend adding a second Rigidbody2D to the same construct if they’re never going to move independently. Rigidbodies are not constrained by the parentage, so you’d have to use another method to affix them. Further… I’m not sure what benefit you’d get.