Cancel ongoing tween?

Hi. Is it possible to cancel an ongoing tween in the playcanvas-tween?

It would be useful and usually tweening engines have this. In many occasions you first trigger a tween for an object and then want to trigger another one before the first one completes.

Hi @jariwake,

Yes there is the stop() method that can run on a tween instance:

var myTween = app.tween(data).to({value: 1}, 1.0, pc.BackOut);

// at any point call this to stop the tween
1 Like