- Home /
2D URP: Determine amount of light hitting object or specific point in scene
Hello, So I want for some objects in my 2D topdown game to react to the lighting around it. One possible solution I found was to add colliders to every light object and on collision we give the object that is being lit the intensity of the light maybe multiplied by the inverse of the Falloff Intensity and somehow also putting the distance between the light and the player into the equation. This way of solving the issue doesn't really work as some lights have additional variables, for example the point 2d light has an inner and an outer radius and there is also freeform lights etc. which make such simple equations not really work in all cases. So my question is, is there some way to actually just measure the amount of light hitting a certain point or a certain object? I saw some threads about using textures but didn't know if that worked for 2D as well or if there is maybe some smarter way to solve the problem as those threads were all quite old. Thank you in advance and I hope somebody can help me with this or knows an easy way of doing this :)
Your answer
Follow this Question
Related Questions
How do I enable ShadowCaster2d? 1 Answer
Ambient Light not working with some objects 1 Answer
Light and 2D Sprite overlapping issue 1 Answer
Point Light showing tileset 0 Answers