giorg Posted November 26, 2018 Share Posted November 26, 2018 hi, I'm doing this which works perfectly: let man = this.add.image(-416, 128, this.man).setOrigin(0, 0); this.tweens.add({ targets: man, x: 0, duration: 2000, ease: 'Power1' }); to show a picture coming out from left side of the screen. Now I need, after a while to make the opposite, so trying: this.time.delayedCall(2500, () => { this.tweens.add({ target: man, x: -416, duration: 2000, ease: 'Power1' }); }, this); but I'm getting this in console: Uncaught TypeError: Cannot read property 'length' of null the error is on the add method. What am I doing wrong? Thanks a lot Link to comment Share on other sites More sharing options...
mapacarta Posted November 26, 2018 Share Posted November 26, 2018 It should be targets not target this.tweens.add({ targets: man, x: -416, duration: 2000, ease: 'Power1' }); giorg 1 Link to comment Share on other sites More sharing options...
giorg Posted November 26, 2018 Author Share Posted November 26, 2018 I must be VERY tired, I could not see it... thanks a lot! mapacarta 1 Link to comment Share on other sites More sharing options...
Recommended Posts