Tween with Real Time? (Solved)

If I wanted to move objDuck from point A to point B on the screen within 2 seconds, insert 2000 in the speed var.
tweenDuck = this.game.add.tween(objDuck).to( { x: pointB.x, y: pointB.y }, speed, Phaser.Easing.Linear.None, true);

I believe tweens are time based, not frame based.

1 Like

Thank you so much, I have figured out that 1000 in the speed var = 1 sec

There is the moveTo methods in Phaser.Physics.Arcade, such as https://phaser.io/docs/2.6.2/Phaser.Physics.Arcade.html#moveToXY
It takes both time and speed params, if the speed is too low to reach the target in time it will be overwritten by another value.