Physics - how to know when things are mostly done moving?

I’m sure this has been asked before, but I couldn’t seem to find it. What is the best way to determine when things are mostly done moving?

[import]uid: 4899 topic_id: 15216 reply_id: 315216[/import]

Use
vx, vy = body:getLinearVelocity()

And check if vx and vy are below a threshold value that you set, if they are, just set it to 0 with body:setLinearVelocity(0,0) and it’s done. [import]uid: 86662 topic_id: 15216 reply_id: 56234[/import]