- Home /
Directional Light makes scene too dark when positioned straight up
So i made a day/night cycle script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TimeScript : MonoBehaviour {
private void Update()
{
transform.Rotate (Vector3.right, 1.0f);
}
}
Very simple, the directional light rotates. But when it points straight up, the scene becomes completely dark and it shouldn't
Screenshots: Day: https://imgur.com/a/AdW0n
Night: https://imgur.com/a/xJcQL
Help
Answer by ZenBubblez · Apr 09, 2018 at 08:03 PM
My painfully complicated method might help out with this problem. Have a second directional light in the same spot, pointed nearly directly up (about -89.9 on the x-axis). Attach a script that will enable the 2nd light when the 1st light's rotation is directly up (-90 on the x-axis). Then have the script disable it when the 1st light's rotation starts to come down.
Your answer
Follow this Question
Related Questions
Shadow not showing up inside closed room 3 Answers
Shadows without directional lighting 1 Answer
Hard lighting orthographic camera and directional light 0 Answers
Hard directional shadows? 3 Answers
Shadows using Point Light 3 Answers