# How to make the camera move along a given curve path?

**URL:** <https://discourse.threejs.org/t/how-to-make-the-camera-move-along-a-given-curve-path/74135>\
**Category:** Questions\
**Tags:** bezier-curve, camera, animation\
**Created:** [November 18, 2024, 2:02pm UTC](https://discourse.threejs.org/t/how-to-make-the-camera-move-along-a-given-curve-path/74135 "2024-11-18T14:02:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avatar\_there](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@Avatar\_there](https://discourse.threejs.org/u/Avatar_there)\
**Post date:** [November 18, 2024, 2:02pm UTC](https://discourse.threejs.org/t/how-to-make-the-camera-move-along-a-given-curve-path/74135/1 "2024-11-18T14:02:57Z")

</div>

Please tell me how to add a curve (closed) to the scene along which the camera can be launched to fly around the scene and back. It is advisable to assign points on the curve at which the camera will linger for a while and fly further.  
 ![resR4](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/1/5/158812eef833443d015e35f6211e8a1f3d3fe9d6.gif)

---

<div class="post-metadata">

**Author:** ![mjurczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mjurczyk/32/10995_2.png) [@mjurczyk](https://discourse.threejs.org/u/mjurczyk)\
**Post date:** [November 18, 2024, 2:22pm UTC](https://discourse.threejs.org/t/how-to-make-the-camera-move-along-a-given-curve-path/74135/2 "2024-11-18T14:22:11Z")

</div>

[camera-controls](https://github.com/yomotsu/camera-controls) (esp. [this](https://yomotsu.github.io/camera-controls/examples/path-animation.html) example) may be what you’re looking for?

---

<div class="post-metadata">

**Author:** ![PavelBoytchev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pavelboytchev/32/38639_2.png) [@PavelBoytchev](https://discourse.threejs.org/u/PavelBoytchev)\
**Post date:** [November 18, 2024, 3:18pm UTC](https://discourse.threejs.org/t/how-to-make-the-camera-move-along-a-given-curve-path/74135/3 "2024-11-18T15:18:53Z")

</div>

Also this might help you more or less: [https://codepen.io/boytchev/pen/poxpGZN](https://codepen.io/boytchev/pen/poxpGZN).

Generally, if you can move a cube along a curve, you could also move the camera long that same curve (the camera has `position` just like the cube). Also, you might want to pay attention to the orientation of the camera (e.g. if you want it to always look forward).

---

<div class="post-metadata">

**Author:** ![hofk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hofk/32/44944_2.png) [@hofk](https://discourse.threejs.org/u/hofk)\
**Post date:** [November 18, 2024, 4:41pm UTC](https://discourse.threejs.org/t/how-to-make-the-camera-move-along-a-given-curve-path/74135/4 "2024-11-18T16:41:48Z")

</div>

A camera can be moved like any other object.

See from the [Collection of examples from discourse.threejs.org](https://discourse.threejs.org/t/collection-of-examples-from-discourse-threejs-org/4315)

… if you want it to always look forward …

[FlightRouteQuaternion](https://hofk.de/main/discourse.threejs/2021/CarRacing/FlightRouteQuaternion.html)  
[BasisToQuaternion](https://hofk.de/main/discourse.threejs/2021/BasisToQuaternion/BasisToQuaternion.html)  
[CarRacing](https://hofk.de/main/discourse.threejs/2021/CarRacing/CarRacing.html)  
[MovementOnCurve](https://hofk.de/main/discourse.threejs/2021/MovementOnCurve/MovementOnCurve.html)  
[MotionAlongCurve](https://hofk.de/main/discourse.threejs/2021/MotionAlongCurve/MotionAlongCurve.html)  
[SmoothTurnsToPath](https://hofk.de/main/discourse.threejs/2019/SmoothTurnsToPath/SmoothTurnsToPath.html)
