Canceling the transition time upon touching

Hi,

I have a ball that I can touch and throw in a zero gravity scene. When I release the ball, an easing animation of 1500 millisec will start. But If I try to touch the ball again before the easing transition is over, the transition will not cancel and will not start immediately again upon touch.

How can I cancel a transition upon touching the same object before the transition time is over? I imagine cancel it somehow before touching it again, but I don’t know exactly how… Someone have a solution on that ? [import]uid: 20617 topic_id: 12107 reply_id: 312107[/import]

Name your transition, myTransition = – your transition here

Then when the ball is touched you can do something like;
[lua]if myTransition then transition.cancel(myTransition)[/lua]

Peach :slight_smile: [import]uid: 52491 topic_id: 12107 reply_id: 44199[/import]