Jump to content

Relative Loop Tween Bug?


Secretmapper
 Share

Recommended Posts

 

This results in a weird tween in my game (player.y = 55):

        this.game.add.tween(player).to({y:'+5'}, 250, Phaser.Easing.Quadratic.Out, true, 0, 100, true);
In that the sprite jumps around. While this works as intended:
 
        this.game.add.tween(player).to({y:55}, 250, Phaser.Easing.Quadratic.Out, true, 0, 100, true);

Is it just me or is it a known bug?

 

 
 
 
Link to comment
Share on other sites

Hmm it's relative to the y coordinate when the tween starts, so the y will constantly be changing in the first instance, where-as it's fixed in the second. It may be a bug specific to yoyo + relative values, but not sure off the top of my head, it may actually be doing what it should do - will have to investigate a bit more. A github issue + reduced code sample would be really helpful.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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