how to make walls invisible when there's light behind them?

meinkushmeinkush Posts: 18Member

i am trying to make a wall disappear when my characters walks behind it, i get that to make it take effect only behind the walls i have to check the angle from which the light is coming but the part i'm having difficulty with is making it actually take effect, is an inverse light_only mode possible or do i need to cover the whole scene with an inverted light texture?

Answers

  • slapinslapin Posts: 61Member
    Answer ✓

    I think you better off raycasting from character to camera and provide intersection info to shader.

  • meinkushmeinkush Posts: 18Member

    @slapin said:
    I think you better off raycasting from character to camera and provide intersection info to shader.

    thanks, that did the trick, i'm using a tilemap so i had to provide the position of the light and calculate the intersection inside the shader but it worked as intended

Sign In or Register to comment.