Jump to content

Dynamic speed on tween


veggis
 Share

Recommended Posts

Hallois

Is there a way to dynamically change speeds with multiple points in a tween?

Lets say i have this tween:

game.add.tween(sprite).to({x:[400, 200],y:[400, 200]},1000); 

The problem here is that the speed will differ when moving to n position in array since the distance gets shorter. Is there a way around this?
I could use onUpdateCallback function and detect when the tween is moving to a new position in array, but I can't seem to find a way to do that.

Any ideas?

 

Thanks

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...