I am trying to get the position of a light from a GLTF file so I can position a sphere created in Babylonjs in the same place.
The x, y, z position of the light are all 0 so I can’t use that.
The transformedPosition coordinates are correct and I can see them in chrome inspector, but when I console.log it, it comes out as undefined. I’m not sure why. How can I get those coordinates?
Hello @mpg just checking in if you still have an issue and if so, if you can provide us with a Babylon.js Playground (babylonjs.com) example so we can help further.
Seems that in your GLB model light position and light rotation are made with the help of TransformNode.
You may check these lines at https://playground.babylonjs.com/#R2B8EF#10