jsauca Posted December 6, 2018 Share Posted December 6, 2018 Hi, I am struggling to properly align a lens flare with the sun from the skybox texture so I was wondering if anyone would have any tips on doing it properly as in the lens flare demo? -> https://playground.babylonjs.com/#QP32DP#1 Quote Link to comment Share on other sites More sharing options...
Guest Posted December 6, 2018 Share Posted December 6, 2018 Hey! The trick is to use scene.onPointerDown to get the coordinates of the "sun" in the scene (See line#50). Then just use these coordinates to move your light (line #14) https://playground.babylonjs.com/#QP32DP#2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.