# Use Bezier curve to create custom object move path

**URL:** <https://forum.babylonjs.com/t/use-bezier-curve-to-create-custom-object-move-path/24009>\
**Category:** Demos and projects\
**Tags:** animation, camera\
**Created:** [September 22, 2021, 12:12pm UTC](https://forum.babylonjs.com/t/use-bezier-curve-to-create-custom-object-move-path/24009 "2021-09-22T12:12:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![LostStar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/loststar/32/9052_2.png) [@LostStar](https://forum.babylonjs.com/u/LostStar)\
**Post date:** [September 22, 2021, 12:12pm UTC](https://forum.babylonjs.com/t/use-bezier-curve-to-create-custom-object-move-path/24009/1 "2021-09-22T12:12:20Z")

</div>

Use Bezier curve to create custom object move path ,create animation and play it. press [space]  
[playground demo](https://playground.babylonjs.com/#N9QD14#9)

![BezierCurve](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/e/9/e9209ebc9f98f58848c102607adec71b5cd52983.gif)

Originally, I wanted to create one cameraPath plugin, like the camerapath I used in Unity3D.

I’ll share the code for creating paths using CatmullRomSpline shortly

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [September 22, 2021, 12:17pm UTC](https://forum.babylonjs.com/t/use-bezier-curve-to-create-custom-object-move-path/24009/2 "2021-09-22T12:17:12Z")

</div>

This is pretty coool !!! I am noticing a tiny glitch when the object is a the tangent point, it looks like it is inverting itself but this should have a place in the doc @PirateJC ?

---

<div class="post-metadata">

**Author:** ![LostStar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/loststar/32/9052_2.png) [@LostStar](https://forum.babylonjs.com/u/LostStar)\
**Post date:** [September 22, 2021, 12:56pm UTC](https://forum.babylonjs.com/t/use-bezier-curve-to-create-custom-object-move-path/24009/3 "2021-09-22T12:56:02Z")

</div>

I’ve fixed it [https://playground.babylonjs.com/#N9QD14#10](https://playground.babylonjs.com/#N9QD14#10)

---

<div class="post-metadata">

**Author:** ![Jenifer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jenifer/32/47234_2.png) [@Jenifer](https://forum.babylonjs.com/u/Jenifer)\
**Post date:** [March 10, 2022, 4:59am UTC](https://forum.babylonjs.com/t/use-bezier-curve-to-create-custom-object-move-path/24009/4 "2022-03-10T04:59:01Z")

</div>

Hi @LostStar actually i do like this… i need your playground in javascript…now it is a typescript…typescript get on error…May i have it, please?

---

<div class="post-metadata">

**Author:** ![musk](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/musk/32/17156_2.png) [@musk](https://forum.babylonjs.com/u/musk)\
**Post date:** [March 10, 2022, 7:20am UTC](https://forum.babylonjs.com/t/use-bezier-curve-to-create-custom-object-move-path/24009/5 "2022-03-10T07:20:20Z")

</div>

You can add a parameter to fix it

> **[Babylon.js Playground](https://playground.babylonjs.com/#N9QD14%2313)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![Jenifer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jenifer/32/47234_2.png) [@Jenifer](https://forum.babylonjs.com/u/Jenifer)\
**Post date:** [March 10, 2022, 11:30am UTC](https://forum.babylonjs.com/t/use-bezier-curve-to-create-custom-object-move-path/24009/6 "2022-03-10T11:30:43Z")

</div>

Thankyou so much @musk 🥰
