Customize the environment

Customize the environment to add a spotlight, and cast a shadow in your scene.

Add a Spotlight

Click on the + button next to the filter and click Blank Entity. Rename it Spotlight.

Select the Spotlight entity in the Scene Graph panel, click Add a component in the Component panel, then select Spot Light**.**

Customize the spotlight & add a shadow caster

  • Click on the spotlight in the Scene Graph and navigate to the Components:

  • Change the color of the light to red.

  • Change the cutoff to 90.

  • You can play with the gizmo to change its direction and position. You’ll notice the values of the Transform components will be updated as you move the object with the gizmos.

  • Navigate to Add a Component at the bottom right of the screen and type in Shadow Caster.

💡 Enable the debug lines to see the light cast by the spotlight.

[object Object]

Add a transparent ground plane

  • In the Scene Graph panel, select the camera entity.
  • Navigate to the Components menu.
  • Check the transparent ground plane option in the Other category. A shadow will appear in the scene.

The scene view was changed in the above example to show the shadow.

💡 In the next section, you’ll be guided through adding a skybox to your scene and you’ll continue exploring Camera settings.

Add a model