Search Unity

2D Mesh Lighting Effect

Discussion in '2D' started by masterlewis05, Aug 10, 2019.

  1. masterlewis05

    masterlewis05

    Joined:
    Jan 16, 2016
    Posts:
    8
    Hey, I'm trying to make a vision effect where the player cannot see behind walls forcing them to walk there. So far I have a top-down area built with a tile-map and am ray-casting all around the player to collect the coordinates and use them in vertices of a mesh: 949e37b0103765f65672f6ae18bc96bc.png

    My question is how do I make the rest of the screen black? Can I make the entire scene dark and somehow light up my mesh?
    Thanks
     
    Last edited: Aug 10, 2019