6 Years Ago
First pass on a system to fade objects that are occluding the player's view For an item to be faded, it needs to be part of the hierarchy of a collider on the Resources layer AND tagged with the "Occlude" tag When an item that passes these conditions is found it will be set to the FadeMaterial on the new CameraOcclusion component, and it's materials will be reverted once that item is no longer occluding the view Manually tagged the leaves on the Birch and Oak trees - tagging isn't part of the model import process yet so this will need to be reapplied after a model update The fade material is just a transparent standard shader, this could definitely be improved