I've been working on a video demonstrating dynamic weather and a night and day cycle in unity. I've edited the video to speed up once the snow stops. To get day and night cycle effect create a c# script and add this line of code to the update function.
transform.Rotate(Vector3.right * Time.deltaTime); Then drop the script onto your spotlight. This will rotate the spotlight on the X axis at 1 degree per second. You could also add an animation to the directional light in unity and rotating it 360 degrees over 2-4 minutes. For a longer cycle just rotate it over a longer time. This method uses up more memory than the code. If anyone wants a video tutorial on how to do it I willl happily make one if there is interest. Keep in mind you need the PRO version of unity. If anyone wants to have a walk around and see it in real time they can click this link. Keep in mind the area is not finished.
0 Comments
Leave a Reply. |
JamieGameDev
|