Place the light based on the user's viewing position


i want to place the Light, which shine to the 3D Model, on the User’s viewing position, that the User which looking this 3D Model have at every Place light and can see all.

I have only founded the 4 Types of Lights but nothing like this.

Is there a Way?


You can update the light position so that it is always following the camera position:

scene.onBeforeRenderObservable.add(() => {
    light.position.set(camera.position.x, camera.position.y, camera.position.z);

Or you can simply set the light position equals to the camera position:

light.position = camera.position;
1 Like

Thank you very much Evgeni :slight_smile: