# Dynamic camera position

**URL:** <https://forum.babylonjs.com/t/dynamic-camera-position/56285>\
**Category:** Questions\
**Tags:** documentation, camera, light\
**Created:** [January 29, 2025, 10:51am UTC](https://forum.babylonjs.com/t/dynamic-camera-position/56285 "2025-01-29T10:51:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![viktor](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/viktor/32/44830_2.png) [@viktor](https://forum.babylonjs.com/u/viktor)\
**Post date:** [January 29, 2025, 10:51am UTC](https://forum.babylonjs.com/t/dynamic-camera-position/56285/1 "2025-01-29T10:51:27Z")

</div>

Hello, I have a question, how do I make the light come from the camera? Everywhere in the documentation there are examples with dynamic changes in the intensity, color, and position of light, but nowhere is it specified how to fix the light at the camera’s anchor point, so that when the camera’s position changes, the light source also changes its position following the camera. Can you tell me how this can be implemented, or from which function or paragraphs in the documentation you need to build on.

---

<div class="post-metadata">

**Author:** ![onekit](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/onekit/32/49527_2.png) [@onekit](https://forum.babylonjs.com/u/onekit)\
**Post date:** [January 29, 2025, 11:05am UTC](https://forum.babylonjs.com/t/dynamic-camera-position/56285/2 "2025-01-29T11:05:59Z")

</div>

Hi, viktor. If you need a quick solution, you can use a `TransformNode` and move it, then attach the light source and camera to the `TransformNode`, making it their parent.  
[BABYLON.Node](https://doc.babylonjs.com/typedoc/classes/BABYLON.Node#parent)

This is my quick answer, but if you’d like, we can go into more detail about what kind of light source you need. Is it a standard Environmental Omni Light or a SpotLight? If it’s a SpotLight, you can attach the camera’s target to the light source’s target also.

In render loop I update every frame the `light.position` and `light.direction` (where `light` is instance of object of Light).
