Skip to main content

080. Unity3d Tutorial - Day Night Cycle Part 9

See video

We continue with another tutorial in our Hack And Slash demo made with the Unity3d Game Engine.

In this video, we adjust the ambient lighting to give it a bit more feeling and to help those that do not have Unity Pro.

Tags:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Offline
Joined: Mar 21 2011

Hiya,

Just getting through these vids, and I had to point out an error in this one (and the last, actually, same problem).

Color * float DOES work, and works exactly as you'd hope (r = r*float, b=b*float etc etc) - however, there's a logic/math error in the way you're scaling from min to max.

At first (and in the last video) you had max*percentage. This will give you a scale from 0 to max.
In this vid you fixed this to be min+max*per. This fixes the bottom range, but will give you a scale from min to min+max.

What you need is: (max-min)*percentage + min. This will give you a nice smooth ride from min to max.

Thanks for the vids, I'm learning a ton about Unity, and well on the way to completing my own game engine :)

Rich