Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

light getting closer to shadow caster makes the shadow too short

Discussion in '2D Experimental Preview' started by CodeGhost, Nov 13, 2020.

  1. CodeGhost


    Mar 31, 2017
    So I'm trying to use shadows as a way to prevent light from revealing things behind a 2D wall. As the player and the point light get closer to the wall, the shadow only hides a short distance and then further things are lit again.

    A bit further away from the wall the shadow is fine. Any way to stop the shadow from shortening?

    Tried to take some screenshots, in the first you can barely see the shadow ending and the area behind being faintly lit. Middle picture shows the form of the wall that is casting the shadow in editor more.

    Last picture shows when player is a bit further away. Clearly the distance between player and wall in the 2 pictures does not match the difference of distance of where the shadow ends.

    Sorry if the pictures are a bit bad.

    Close.PNG editor.PNG far.PNG