Detect if physics object has stopped moving.

How can I detect if physics object has stopped moving OR slowed down to a certain speed? Thanks.

-Chandler Mayo [import]uid: 104852 topic_id: 21385 reply_id: 321385[/import]

look at its linear velocity:

vx, vy = myBody:getLinearVelocity()

http://developer.anscamobile.com/reference/index/bodygetlinearvelocity

if that returns 0 or less than a certain value you can see if it stopped or slowed down [import]uid: 69531 topic_id: 21385 reply_id: 84714[/import]