Alfredo Posted July 19, 2014 Share Posted July 19, 2014 I'm trying to make a sprite moving following a path using tween and sprite.positionvar vec = this.trail[this.trail.length-1];var tween = new game.Tween(this.sprite.position);tween.to(vec, 100);for (var i = this.trail.length-2; i >= 0; i--) { var extraTween = new game.Tween(this.sprite.position); var extraVec = this.trail[i]; extraTween.to(extraVec, 100); extraTween.delay(100*(this.trail.length-i-1)); extraTween.start();}tween.start();I also tried to use Tween chain without success... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.