Jump to content

How to change tween position


wexing
 Share

Recommended Posts

Hello im new in phaser and can't find solutions for this problem. 

 

So i  have sprite like: 

this_object.symbolA = this_object.add.sprite(this_object.world.centerX, this_object.world.centerY, "symbolA");
this_object.symbolA.anchor.setTo(0.5, 1);
this_object.symbolA.scale.set(0.7, 0.7);

And tween: 

this_object.symbolA_tween = this_object.add.tween(this_object.symbolA).to({
   x: this_object.symbolA.x - 5,
   y: this_object.symbolA.y - 30,
   width: this_object.symbolA.width + 10
}, 1000, Phaser.Easing.Linear.None, true, 0, -1, true);

so my tween is working on center of world. My game chaning resolution when orientation is changed (from 675x1200 to 1200x675). How can i keep this tween still on center of world? thanks.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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