Let’s say we’re in 2D view and there are 3 objects that have different z position values and partially overlap each other: InvisibleMask, ObjectA, and ObjectB. InvisibleMask is closest to the camera, then ObjectA, and then ObjectB. If I want to use InvisibleMask to only hide ObjectB where InivisibleMask overlaps ObjectB and not hide ObjectA at all, I can set the renderqueue of ObjectB to be higher than that of InvisibleMask while setting the renderqueue of ObjectA to be equal to or less than that of InvisibleMask. However, by doing so, ObjectB will appear in front of ObjectA where InvisibleMask does not overlap ObjectB, even though ObjectA is really in front of ObjectB. ObjectB now has a higher renderqueue than ObjectA, but I don’t understand why this would cause ObjectB to appear in front of ObjectA when ObjectB, which also has a higher renderqueue than InvisibleMask, does not appear in front of InvisibleMask.
InvisibleMask has to be closest to the camera for reasons, so given this constraint, is what I’m trying to do even possible? It seems that I have to somehow give the same renderqueue to both ObjectA and ObjectB except for where InvisibleMask overlaps ObjectB.