# What is the proper way to position a directional light?

**URL:** <https://forum.babylonjs.com/t/what-is-the-proper-way-to-position-a-directional-light/42037>\
**Category:** Questions\
**Created:** [June 29, 2023, 2:04pm UTC](https://forum.babylonjs.com/t/what-is-the-proper-way-to-position-a-directional-light/42037 "2023-06-29T14:04:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![swim81](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@swim81](https://forum.babylonjs.com/u/swim81)\
**Post date:** [June 29, 2023, 2:04pm UTC](https://forum.babylonjs.com/t/what-is-the-proper-way-to-position-a-directional-light/42037/1 "2023-06-29T14:04:47Z")

</div>

Hi all:

Originally I was confused as to why my shadows weren’t showing up until I took my local code and turned it into a playground example… I realized that my shadows weren’t showing due to the positioning of my directional light.

I would think that raising the Y val would make the directional light go upwards. But my shadows don’t appear on the street mesh unless I put a negative Y value for the directional light:

```auto
dLight = new BABYLON.DirectionalLight(
    'DirectionalLight1',
    new BABYLON.Vector3(0, -20, 0), // why do I need a negative Y value here???
    scene,
);

```

I have the playground here: [https://playground.babylonjs.com/#YNEAUL#4299](https://playground.babylonjs.com/#YNEAUL#4299)

Is there something that I am missing or doing incorrectly?

Thanks for taking the time to look and help!!

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [June 29, 2023, 2:49pm UTC](https://forum.babylonjs.com/t/what-is-the-proper-way-to-position-a-directional-light/42037/2 "2023-06-29T14:49:03Z")

</div>

2nd parameter is not the position but the direction vector.

> **[DirectionalLight | Babylon.js Documentation](https://doc.babylonjs.com/typedoc/classes/BABYLON.DirectionalLight#constructor)**
>
> A directional light is defined by a direction (what a surprise!).The light is emitted from everywhere in the specified direction, and has an infinite

\<0 for Y means light is directed to the ground.

---

<div class="post-metadata">

**Author:** ![swim81](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@swim81](https://forum.babylonjs.com/u/swim81)\
**Post date:** [June 29, 2023, 2:54pm UTC](https://forum.babylonjs.com/t/what-is-the-proper-way-to-position-a-directional-light/42037/3 "2023-06-29T14:54:54Z")

</div>

got it thanks!

---

<div class="post-metadata">

**Author:** ![musk](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/musk/32/17156_2.png) [@musk](https://forum.babylonjs.com/u/musk)\
**Post date:** [June 29, 2023, 3:01pm UTC](https://forum.babylonjs.com/t/what-is-the-proper-way-to-position-a-directional-light/42037/4 "2023-06-29T15:01:09Z")

</div>

Tip: this function can visualize the shadow calculation area. It helps to get the correct shadow. [Create a shadow just get a circle - #2 by Evgeni\_Popov](https://forum.babylonjs.com/t/create-a-shadow-just-get-a-circle/20672/2)
