Jump to content

How can scale without changing the position with a different anchor at (0.5, 0.5)?


jdnichollsc
 Share

Recommended Posts

Hi friends!  :)

 

One question... ¿How can I scale sprite with a tween without changing the position with a different anchor at (0.5, 0.5)?

var planatasmedio = this.game.add.sprite(0, this.game.height, 'planatasmedio');planatasmedio.anchor.setTo(0, 1);//CODE... move my image for example x = -500;game.add.tween(planatasmedio.scale).to({ x: 3, y: 3});//the position changes 

Thanks in advance!

 

Regards, Nicholls

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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