# Setting the speed of an object that follows a path

**URL:** <https://phaser.discourse.group/t/setting-the-speed-of-an-object-that-follows-a-path/6959>\
**Category:** Phaser 3\
**Created:** [July 16, 2020, 2:52pm UTC](https://phaser.discourse.group/t/setting-the-speed-of-an-object-that-follows-a-path/6959 "2020-07-16T14:52:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zago](https://avatars.discourse-cdn.com/v4/letter/z/ecccb3/32.png) [@Zago](https://phaser.discourse.group/u/Zago)\
**Post date:** [July 16, 2020, 2:52pm UTC](https://phaser.discourse.group/t/setting-the-speed-of-an-object-that-follows-a-path/6959/1 "2020-07-16T14:52:12Z")

</div>

Hi,  
i’m trying to reproduce this example:  
[https://labs.phaser.io/edit.html?src=src/paths/curves/drag%20ellipse%20curve.js&v=3.24.1](https://labs.phaser.io/edit.html?src=src/paths/curves/drag%20ellipse%20curve.js&v=3.24.1)

and i would like to know if there is a way to get the speed for every point and change it on the fly when needed.

my final goal is to change speed value when the object reach the x position edges

Thanks

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [July 22, 2020, 4:48pm UTC](https://phaser.discourse.group/t/setting-the-speed-of-an-object-that-follows-a-path/6959/2 "2020-07-22T16:48:04Z")

</div>

I think it’s difficult to change a tween duration on the fly.

You could maybe add a new tween for the new duration, possibly seeking it.
