Directional lighting

When we create a new scene in Unity, a directional light is automatically created for us. This emphasizes the importance of directional lights. This type of light provides illumination in a specific direction. Using transform tools, we have full control over the direction of these lights. 

An example of directional lighting is generating sunlight in our scenes. Although the light from directional lights is similar to that of the sun, there is no actual sun-like object that the light comes from. As shown in the following screenshot, Directional Lights, when selected, indicate the direction of its illumination with yellow rays:

One of the great aspects of using directional lighting is that illumination strength is not dependent on an object's distance from the Directional Light object. This type of lighting defines the direction of the light, and distance has no impact on the illumination. 

With a Directional Light selected, you have access to several parameters in the Inspector panel. In addition to the Transform section, there is a Light section where you can change several settings to include the light color and intensity. The remaining parameters are worth exploring and no changes are required to complete our game.

To add additional directional lights, you would select, from the top menu, GameObject | Light | Directional Light.

For the Cucumber Beetle game, we will keep the default Directional Light. You can use the transform tools to modify the location, rotation, and light direction. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset