Hsaka Posted April 28, 2013 Share Posted April 28, 2013 Hi, is it possible to tween a sprite's x/y scale factor? If so, how can I achieve this? Link to comment Share on other sites More sharing options...
HackManiac Posted April 28, 2013 Share Posted April 28, 2013 Have a look at: http://jsfiddle.net/J3gdX/5/ That example tweens 'sprite.scale.x' and 'sprite.scale.y' if you hover over the button. Since the tweening functionality in Phaser does not support to use property paths (like 'scale.x') you have to explicitly create a tween for the object 'sprite.scale' and then tell the tween to change the properties 'x' and 'y' in it. If you want to change properties in the sprite as well just use a second tween for that. Hsaka 1 Link to comment Share on other sites More sharing options...
Hsaka Posted April 28, 2013 Author Share Posted April 28, 2013 Ah I see. Thanks a lot! Link to comment Share on other sites More sharing options...
Recommended Posts