Question

So I'm working on a unity project, in which i use a light spot to light up the area which the hero can see (I can't post 3 links in one question so i'll just write it in the comments)

when i launch the game using the play button above( in the editor) everything works fine, outside of the light point, everything is dark, and the light point lights up what's inside of it. BUT, in the Web, Standalone and Android versions(Haven't tried others) they all have the same problem, there is no darkness and the objects in the light point( the light point is not visible) are fully lit up like in this picture (the same error happens in every one of the platforms, but I'm showing the web version)

enter image description here

this is how it happens in the editor(How it's supposed to happen)

enter image description here

Here's how it looks like in the editor

enter image description here

Thank you for your attention

Was it helpful?

Solution

I realised there was something wrong with the directional light I had. I just tweaked it a little bit and VIOLA! It's solved.

The problem was with the global directional light, not the point, because on the directional light I had the "Enable Shadows" unticked and it was rotated awkwardly, so I set the rotation to 90/90/90 and made the color black, set the intensity and ticked enable shadows and that solved it!

OTHER TIPS

Because orthographic camera don't draw shadows for point and spot lights.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top