# Light position changed when exporting to glb in sandbox

**URL:** <https://forum.babylonjs.com/t/light-position-changed-when-exporting-to-glb-in-sandbox/14334>\
**Category:** Bugs\
**Created:** [September 22, 2020, 8:12am UTC](https://forum.babylonjs.com/t/light-position-changed-when-exporting-to-glb-in-sandbox/14334 "2020-09-22T08:12:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MungbeanNoodle](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mungbeannoodle/32/11206_2.png) [@MungbeanNoodle](https://forum.babylonjs.com/u/MungbeanNoodle)\
**Post date:** [September 22, 2020, 8:12am UTC](https://forum.babylonjs.com/t/light-position-changed-when-exporting-to-glb-in-sandbox/14334/1 "2020-09-22T08:12:33Z")

</div>

I imported a glb file with a light in the sandbox, then exported it to a new glb file( **no modification** ). When I imported the new file again, I found that the light position changed.

**Screenshots**  
 ![Snipaste_2020-09-22_16-11-40](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/3/300afc41a779234bc1433b231879ebc573fd7f17.png)

**Desktop:**

- OS: windows 10 professional 1909
- Browser [chrome]

I suppose the question located at here:

[Babylon.js/serializers/src/glTF/2.0/Extensions/KHR\_lights\_punctual.ts](https://github.com/BabylonJS/Babylon.js/blob/15804eb5e9c5d5562fad3c5a8167ddc22ddd8431/serializers/src/glTF/2.0/Extensions/KHR_lights_punctual.ts#L148)

Line 148 in [15804eb](https://github.com/BabylonJS/Babylon.js/commit/15804eb5e9c5d5562fad3c5a8167ddc22ddd8431)

if (parentNode) {

When I commented out the lines related to the transformations , it seemed to work fine.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [September 22, 2020, 8:39am UTC](https://forum.babylonjs.com/t/light-position-changed-when-exporting-to-glb-in-sandbox/14334/2 "2020-09-22T08:39:52Z")

</div>

I think @Drigax will be able to help.

---

<div class="post-metadata">

**Author:** ![Drigax](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/drigax/32/16585_2.png) [@Drigax](https://forum.babylonjs.com/u/Drigax)\
**Post date:** [September 22, 2020, 3:34pm UTC](https://forum.babylonjs.com/t/light-position-changed-when-exporting-to-glb-in-sandbox/14334/3 "2020-09-22T15:34:51Z")

</div>

Do you have a playground that reproduces this? The light local position will change due to reorienting the light to fit glTF’s schema:

> **[KhronosGroup/glTF](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual#adding-light-instances-to-nodes)**
>
> glTF – Runtime 3D Asset Delivery. Contribute to KhronosGroup/glTF development by creating an account on GitHub.

However, the world transform of the light should be identical to the original light.
