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?