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

 Share

  • Recently Browsing   0 members

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