Shadows With Lighting

So i realized we never went over this but it really concerned me how to change the shadows or direction of the light to make shadows to make your scene look better. For example if you change the position of the light the shadows should move but they dont. ive been testing around with the light alot but the position of the light never changes and i cant make shadows like in the video.

Also i realized i dont have that blue sky in my scene which is odd. In my scene view everything is the same i can only see the lighting change in game.


helplight3

Hi Jayy,

Different types of light will behave differently. In the above, and your first screenshot, you have a Directional Light, it doesn’t matter where you position this in the scene, up, down, left or right it will behave the same - however - if you rotate it, the direction of the light will change and you will be able to affect the shadows.

There could be several reasons for this, but it’s hard to tell from the screenshots alone. If you select the Main Camera GameObject in the Hierarchy, does it have a Skybox set, or just a Color - perhaps black?

On the Scene tab, note the location of the 2D button, and next to it the Light button. When you have this turned off only a light attached to the Scene view camera is used, when you turn it on, it will use the lighting in the scene.

Hope this helps :slight_smile:


See also;

Unity - Manual : Type of light

All of it was turned off.


I turned them all on now thanks for the help on that. As for as the shadows go ill take what u said and test it out in a sandbox scene Thank you!

1 Like

You’re very welcome :slight_smile:

Incidentally, looks like the Alpha on the Background colour of your Main Camera is set to 0.

i posted a video to see if it worked and it did. idk how to delete post tho lul

If you want a topic deleted flag it and I will resolve.

Alright so i started to play around with the lighting to get shadows but the same thing is happening where instead of getting shadows of an object onto the ground i get shades. Trying to use a video i recorded 10 seconds using the the xbox recorder but its too large :frowning:

With your Directional Light selected in the Hierarchy, view the Inspector. Note the Shadow Type and how you currently have it set to No Shadows. Try setting it to Soft Shadows.

also i cant seem to understand why but maybe its cuzz i didnt follow along is didnt hear when he said something idk but when i put my camera prefab into my other game scenes its not the same. they arent dark

oops nvm. i forgot that i had a directional light in it so when i put the prefab nothing happened because i had a main light in it and never got rid of it.

tested it out. thank you.

1 Like

You’re very welcome :slight_smile:

Problem now resolved?

1 Like

yep. works perfectly

1 Like

Great, I’ll mark the topic as solved then, link below for future reference :slight_smile:


See also;

1 Like

thanks

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms