How to turn shadow on in 3D scene?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By icqqq
:warning: Old Version Published before Godot 3 was released.

Hi all,
I am using Godot 2.1.4 and I found that after I added DirectionalLight,
the objects in the scene still don’t cast shadows.

How can I turn on shadow?

Thanks!

:bust_in_silhouette: Reply From: mollusca

Turn on Shadow in the DirectionalLight properties and set the Max Distance to something larger than zero. Larger values means the shadows are visible from a greater distance, but the quality of the shadows will be worse. Also check the docs on shadow mapping if you haven’t already.