Directional Light not casting shadows in all directions

I have a scene with a directional light (Scene Light) as the sun and a light (SkyBox Light) with no shadows and a culling mask of Nothing to mark the sun position. When I trigger movement, it uses the following code which rotates the sun around the horizon, then raises it up (0.1 degrees), Repeat.

azimuth = saveAzimuth + 0.1f;
if (azimuth >= 360f)
{
azimuth = 0f;
altitude = saveAltitude + 0.1f;
if (altitude >= 180f)
{
altitude = 0f;
}
}
saveAltitude = altitude;
saveAzimuth = azimuth;
skyboxLightTransform.eulerAngles = new Vector3(altitude, azimuth, 0.0f);
sceneLightTransform.eulerAngles = new Vector3(altitude, azimuth, 0.0f);

As I understand this, it should show 360 degrees of shadow. It does not. It only seems to draw shadows from y (azimuth) 140 to -20

Here is a video. The only relevant data is the Scene Light x and y. The time changing at the bottom is an artifact of the previous programming. Sorry for the slight fuzziness, I was trying to reduce file size. http://neighborhoodinnovations.com/download/shadows.mp4
The original is http://neighborhoodinnovations.com/download/shadows_Unity%202018.2.9f1_‎2018-‎10-‎16_14-41-35.mp4

Can anyone explain what I am doing wrong or how to fix this problem?

When you don’t see the shadow from the tree on the terrain it appears your entire terrain is in shadow. If the entire terrain is in shadow you shouldn’t expect to be able to make out any shadow from the tree. Take a look at what direction your directional light is facing when this happens.

Also, you’re posting a support question in one of the only forums that forbids support questions.

1 Like

Also please use the code tags.

I don’t think this has anything to do with the azimuth, I think it has to do with the altitude.

1 Like

moved to Editor & General Support thanks.