react-globe.gl
react-globe.gl copied to clipboard
Scene rotation and lighting
Describe the bug The scene looks to be rotated everything rather than the globe itself. When I changed the lighting and position, it caused weird behavior visually. To Reproduce https://codesandbox.io/s/hex-points-6dn7q9?file=/src/TestGlobe.js
Expected behavior Have a static directional light that does not move on globe rotation or control. There is also a weird behavior with the light such that is only lights up half the globe and not dynamically changed bases on the position of the light/globe
Screenshots Here is a video of the issue
https://drive.google.com/file/d/12FslkFQZjLJfMTALt9odKMXvBuS-gnll/view?usp=sharing
Why do the lights rotate with the globe? How can I isolate the globe and the lights so that when i rotate the globe, it does not rotate the lights with it?
I was even able to add a new light to the scene, but it follows the same behavior.
@jo185128 when you are interacting with the canvas via click-drag, you are in reality not rotating the globe, but instead you're moving the position of the camera around the globe. This is done using ThreeJS Orbit Controls.
So essentially everything in the scene stays exactly where it is in relation to each other including the globe and all the lights. It's only your point of view that's changing. This probably explains what you're describing above.