Dhouzy Posted September 13, 2016 Share Posted September 13, 2016 hi, I'm moving 2 chain tween but when the second tween is executed the position of the sprite is not updated... moveCase.to({x: 328}, 750, Phaser.Easing.Linear.In); moveCase2.to({x: sprites.position.x - 50}, 500, Phaser.Easing.Linear.In, true, 780); moveCase.chain(moveCase2); moveCase.start(); I tried a lot of things ... there is something I don't understand. Any help is greatly appreciate. Thanks Link to comment Share on other sites More sharing options...
samme Posted September 14, 2016 Share Posted September 14, 2016 Hi Dhouzy, remove `autostart` and `delay` from the second tween: http://codepen.io/anon/pen/ZpWBko . It will start automatically after the first tween finishes. Dhouzy 1 Link to comment Share on other sites More sharing options...
Dhouzy Posted September 14, 2016 Author Share Posted September 14, 2016 Oh, yeah it help thanks!! But the result I was looking for was: the new position -50. But I can just do... moveCase2.to({x: 328 - 50}, 500, Phaser.Easing.Linear.In, true, 780); Link to comment Share on other sites More sharing options...
samme Posted September 15, 2016 Share Posted September 15, 2016 Ah, for that you need to use Tween#onComplete: http://codepen.io/anon/pen/kkbodk?editors=0010 Link to comment Share on other sites More sharing options...
Recommended Posts