"2014" Posts

Aligning a directional light to the skybox


When the directional light representing the sun matches the angle of the sun in the skybox, the lighting in the scene feels correct and can add believability to the game and game play.

Small discrepancies maybe hard to pin down, but if the lighting doesn’t match, things just seem wrong.

Aligning a directional light to the sun in the skybox can seem like a real pain, however, with lots of trial and error to get it correct.

There is one quick trick that makes aligning the directional light to the sun painless and simple.


Using Lerp properly

LERPWhat is Lerp?

Lerp is the term for Linear Interpolation.

In short, Lerp, in Unity, is for finding a desired value between two known values.

As of the time of publishing this article, Lerp is horribly abused and terribly documented, and I would like to redress this, if at all possible.