Hello,
I’m new at Corona and got excellent help in my last topic. After trying to figure this out for myself for a while I wanted to ask.
How could I tell if an object stops moving? I looked into getlinearvelocity, and also event:speed, and I couldn’t get any to work. I wanted to stop something if an object hasn’t moved for a few seconds.
This leads me to the next thing. I’ve made an improvised timer, but it worked pretty sloppily.
Then there is timer.performWithDelay( delay, listener [, iterations] )
Does that make sense in this context? Could I call this, if an object stops moving for X seconds? I’d like it to also abort the “stopping”, once it starts moving. I think I could just use (cheap code) “if speed < number then initiate stopping” and it would stop if the speed would rise over “number”, no?
When I tried around with performWithDelay it seemed to be “unstoppable” though once initiated.
Which would be the most resourceful and practical solution to this?
Any help is appreciated, thanks! [import]uid: 65258 topic_id: 10884 reply_id: 310884[/import]