# Shadow is not being updated

**URL:** <https://forum.babylonjs.com/t/shadow-is-not-being-updated/1372>\
**Category:** Questions\
**Created:** [February 14, 2019, 12:43am UTC](https://forum.babylonjs.com/t/shadow-is-not-being-updated/1372 "2019-02-14T00:43:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Immortality](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Immortality](https://forum.babylonjs.com/u/Immortality)\
**Post date:** [February 14, 2019, 12:43am UTC](https://forum.babylonjs.com/t/shadow-is-not-being-updated/1372/1 "2019-02-14T00:43:48Z")

</div>

This is what I have done.  
1.Made a light.  
2.made a shadow generator  
3.set receiveShadow, etc.  
4.things worked great.  
5.changed light position,rotation.  
6.shadow is not being updated.

I position and rotation of light was perfect since I have tested it with box.

---

<div class="post-metadata">

**Author:** ![Wingnut](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wingnut/32/53_2.png) [@Wingnut](https://forum.babylonjs.com/u/Wingnut)\
**Post date:** [February 14, 2019, 1:37am UTC](https://forum.babylonjs.com/t/shadow-is-not-being-updated/1372/2 "2019-02-14T01:37:25Z")

</div>

Hello, welcome to the forum. Here is a demo playground scene… with two types of moving lights.

[https://www.babylonjs-playground.com/#1EVNNB#122](https://www.babylonjs-playground.com/#1EVNNB#122)

You didn’t say WHICH type of light that YOU are using.

When using directionalLight… it is important to do light.setDirectionToTarget() AFTER moving the light. See line 86.

For pointLight shadows, there is no-need to do that.

I have no spotLights in the scene, but _.setDirectionToTarget()_ would be wise for moved spotlights, too.

I hope this helps. We LIKE playground scenes. They make it easier for forum helpers… to help. 🙂

Aside: @Deltakosh (Luaacro?) … notice artifact on one sphere shadow. Likely a precision issue, but perhaps worth noting. Party on!

Where IS Luaacro, anyway? He needs to come visit or tell us his new name. 🙂 Lurker Lu
