Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Pointlight in a 2D game

Discussion in '2D' started by Sonatai, Aug 14, 2019.

  1. Sonatai


    Jan 14, 2018
    we are developing a 2D game and wanted to use pointlights.
    We saw the following tutorial about light in 2D games:

    Because we wanted an advanced lighting we are using our own "normal map", but the pointlight don't behave like it should. Just half of the circle illuminate the map, the other half is just black. We tried some solution approaches, but nothing works.

    We tried to change the configuration of the normal map, also tried to import first as texture than as normal map.
    Also we tried to change the property of the light or the z position but we have still the problem. We don't know what else we could try, that's why we hope, that someone could help us from the forum.

    I attached a picture of the problem and a picture of the property from the normal map.

    Attached Files:

  2. MSplitz-PsychoK


    May 16, 2015
    I do not believe your normal map was made correctly. Most of your map is yellow, which represents a surface which is facing up and to the right from the viewers perspective, so it makes sense that it only receives the light shining down and to the left (against the direction of the normal map).

    Below is a normal map of a cone. The yellow faces the upper right. If you want different parts of your map to receive light from different directions, you will need to use the normal colors from the appropriate direction. The solid blue-ish purple outside the cone is the normal color you should use for flat surfaces, like the ground, that should receive light from "above" it instead of a particular direction.


    Good luck!
    Last edited: Aug 14, 2019