If you've got a moving object in the scene that you want to highlight with a spotlight, you need to be able to change the direction a light is pointed at. In this recipe, we will show you how to do just that. We will show you how you can keep THREE.SpotLight
pointed at a moving object in the scene.
There are no steps that you need to take to run this recipe. You can see the final result of this recipe by opening up the 05.07-make-a-light-follow-object.html
example in your browser. You will see something similar to the following screenshot:
In this example, you can see a sphere that moves from left to right and back again. THREE.SpotLight
in this scene follows the position of this sphere so that it is always pointed directly at the center of that object.