makalu Posted October 20, 2018 Share Posted October 20, 2018 In Phaser 2 we could tween scale like in the topic linked below. How is this done in Phaser 3? It looks like the sprite Scale property has changed to scaleX and scaleY, which I thought maybe I could tween like this, but this didn't seem to work: this.scene.tweens.add({ targets : [ this.scaleX, this.scaleY ], x: 10, y: 10, ease : 'Linear', duration : duration, yoyo : false, repeat : 0, callbackScope : this }); Link to comment Share on other sites More sharing options...
makalu Posted October 20, 2018 Author Share Posted October 20, 2018 Just figured it out, using scaleX and scaleY... this.scene.tweens.add({ targets : [ this ], scaleX: 10, scaleY: 10, ease : 'Linear', duration : duration, yoyo : false, repeat : 0, callbackScope : this }); andrsrz and Bonsaiheldin 1 1 Link to comment Share on other sites More sharing options...
s4m_ur4i Posted October 21, 2018 Share Posted October 21, 2018 On 10/21/2018 at 4:51 AM, makalu said: Just figured it out, using scaleX and scaleY... this.scene.tweens.add({ targets : [ this ], scaleX: 10, scaleY: 10, ease : 'Linear', duration : duration, yoyo : false, repeat : 0, callbackScope : this }); this.scene.tweens.add({ targets : this , scale : 10 ease : 'Linear', duration : 500, }); You can simplify it. targets only needs to be an array if it's multiple targets. scale: 1 does both X&Y yoyo default is false, as 0 of repeat and "this" of callbackScope. andrsrz, Befive.Info and Bonsaiheldin 2 1 Link to comment Share on other sites More sharing options...
Recommended Posts