Game Development Blog
  • Home
  • Games
    • Captain Cat
    • Clay Defender
    • Nee and the Thaw
    • The Polygon Proposal
    • Prototypes
  • College Projects
  • About Me
    • About Me
    • Contact

College Project Blog 31/10/13

10/31/2013

0 Comments

 
Picture
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.

    Picture

    JamieGameDev
    Never Stop Learning

    Author

    The All Spark at GameSparks. Love making Games

    Archives

    January 2015
    June 2014
    May 2014
    October 2013
    September 2013
    August 2013
    May 2012

    New Game
Powered by Create your own unique website with customizable templates.
  • Home
  • Games
    • Captain Cat
    • Clay Defender
    • Nee and the Thaw
    • The Polygon Proposal
    • Prototypes
  • College Projects
  • About Me
    • About Me
    • Contact