loover Posted May 7, 2017 Share Posted May 7, 2017 How to make a tween whit durations in frames? var tween = game.add.tween(object).to({x: 100}, 300, Phaser.Easing.Linear.None); tween.frameBased = true; tween .start(); not works. It duration remains 300 ms, but not a 5 seconds (300 frames / 60 FPS). Link to comment Share on other sites More sharing options...
samme Posted May 7, 2017 Share Posted May 7, 2017 Contrary to some of the earlier docs, the duration is always set in ms whether it's frameBased or not. To convert, use FRAMES * game.time.physicsElapsedMS. Link to comment Share on other sites More sharing options...
loover Posted May 8, 2017 Author Share Posted May 8, 2017 Thanks. So documentation is wrong in this section? Link to comment Share on other sites More sharing options...
samme Posted May 8, 2017 Share Posted May 8, 2017 Yes. in fact, the Phaser CE docs are still wrong on this point too. Link to comment Share on other sites More sharing options...
Recommended Posts