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?