Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Sprites as light

Discussion in '2D' started by PRABHBIR123, Jun 14, 2018.

  1. PRABHBIR123

    PRABHBIR123

    Joined:
    Apr 9, 2017
    Posts:
    72
    I have circular sprite near my player which has light white color.
    I want this sprite to behave as a light so that it affects my other sprite.
    I want all the sprites near it to light up and other sprites to be dark.
    If you have any ideas please help.
    THANKS IN ADVANCE
     
  2. PixelGX

    PixelGX

    Joined:
    Jul 4, 2015
    Posts:
    100
    Put a light object inside a sprite and edit the lighting in the game to be dark
     
  3. LOGames

    LOGames

    Joined:
    Sep 4, 2016
    Posts:
    19
    You can give that sprite a material with an additive blending mode, one of the particle shaders would work as a test. I think that's how Hollow Knight did most(all?) of their lighting.

    edit. to be clear this will only affect things *under the sprite, not near it.
     
  4. PRABHBIR123

    PRABHBIR123

    Joined:
    Apr 9, 2017
    Posts:
    72
    I was really inspired by the lighting of hollow knight. I wanted to create something like that only
     
  5. PRABHBIR123

    PRABHBIR123

    Joined:
    Apr 9, 2017
    Posts:
    72
    Thanks
     
  6. PRABHBIR123

    PRABHBIR123

    Joined:
    Apr 9, 2017
    Posts:
    72
    #LOGames are u sure how they created light
     
  7. LOGames

    LOGames

    Joined:
    Sep 4, 2016
    Posts:
    19