Jump to content

Phaser Tween with no Acceleration


InsOp
 Share

Recommended Posts

The thing that's being interpolated with Linear/Bezier/Catmull here is not the time (which is always sinusoidal ease in/out, that's where the acceleration comes from), but the x and y values. So it switches between how the path between the points looks, but not the speed at which the path is taken. 

Link to comment
Share on other sites

if i understood you correctly i could change this line:

 tween = game.add.tween(logo).to( { x: [ w, w, 0, 0 ], y: [ 0, h, h, 0 ] }, 4000, "Sine.easeInOut", true, -1, false);

into

 tween = game.add.tween(logo).to( { x: [ w, w, 0, 0 ], y: [ 0, h, h, 0 ] }, 4000, Phaser.Easing.Linear.None, true, -1, false);

? well it works with this particular example, thanks. 

(then im having trouble with something else, i havent figured out yet, which is giving me the expression of accelerating)

Link to comment
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...
 Share

  • Recently Browsing   0 members

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