How would I be able to modify the Quick Outline Asset so that I can see through objects that they themselves are outlined?

I know the title sounds really confusing but I have a situation where I’m moving planes in my game. I want to be able to see when there is a part of another plane under my plane. However, I want to be able to do this with all planes. I need to keep the colliders tight in order to do collision detection. Quick Outline | Particles/Effects | Unity Asset Store.

This allows me to do what I want if the object I’m trying to see the overlap through does not have the script attached. However, once I try to have that with both objects then it does not show through.

I don’t know which plane will be taller so I can’t dynamically change the script being attached and there could be a case where one plane wing could be higher than the plane while another could be lower. I want to be able to see the part of the middle plane that is under the higher plane and be able to see the lower plane through the middle plane.

These planes have textures which are at different depths and I don’t want to be able to see the textures through the plane so I would also need a way to differentiate planes.

Is this asset able to be modified or is there another solution?

  1. Use Physics.OverlapBox for each part of the airplane to check for overlap with other parts. This will allow you to check for overlap in both directions.
  2. Assign unique LayerMasks to each part of the airplane. Then you can check for overlap only with certain LayerMasks to determine if one part overlaps another.
  3. Use CompareTag or GetComponent to determine if the object that overlapped is part of the same airplane. Ignore overlaps with the same tag/component.