Sign in to follow this  
veggis

Dynamic speed on tween

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.