Flashlight Follow Camera

Hi, I’d like to build some kind of flashlight or Torch effect where the ground is only lit where to camera’s looking at.

Here is my PG so far - I don’t know how to make to make the camera follow my mousemove


        spotLight.position = camera.position;
1 Like

Another approach is you could parent the spotLight to the camera, then you don’t need to use onBeforeRenderObservable

You probably need something other than ArcRotateCamera also, because torch light for that is still going to point at the one place.


1 Like