Search Unity

How to make a bright light inside a box which is opening (or light rays around a semi-opened door) ?

Discussion in 'General Graphics' started by Snake9, Aug 21, 2017.

  1. Snake9

    Snake9

    Joined:
    Nov 18, 2016
    Posts:
    30
    Hi,

    I have a box, the box opens by a translation of its top face. I want to do a bright light inside the box, I used a flarelens on my light but I have a problem : either the light is visible through the top-side of the box, either the light is completely hidden. How can I make my light partially hidden by the top-side ?
    Some images to illustrate :

    the box is closed, everything is OK :


    the box is opened but we don't see the light (not ok) :


    the box is opened and we see the light but it is visible through the top-side (not ok) :


    what I want (something like that stuff made with MS Paint lol) :



    How can I accomplish that ?
    This is like, for example, I have a closed door but I want the player can see light rays around the door, something like this :



    I have no idea about how to do that.
    Thanks in advance !