Jump to content

Tweens Problem


kmilinho
 Share

Recommended Posts

Hi, I have a game that use a tween for moving a ball using:

 

dropOneBall function:

...

var tween = this.state.add.tween(ball).to(ballNumber.path, 250);

tween.interpolation(function (v, k) {

     return Phaser.Math.linearInterpolation(v, k);
});

...

 

Every time you play, several balls drop like a waterfall, one after another following different paths, using tweens. 

 

The balls remain on the screen until you play again. Before playing again, all the balls are deleted and the new game start.

The problem is that after a couple of rounds played, the tween start acting weird, instead of rolling following the path, from the beginning to the end of it,  the tween skip part of it and is like the balls disappear and appear ahead (teletransport). If you reload the game, the problem disappear.

I tried to delete the old tweens, delete timers between plays, print the fps and several performance test but I cant find the problem. Anyone have a clue about what may be happening?

Thank you.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...