Page 1 of 1

Best way to detect when all b2Body done colliding

Posted: Tue Jun 03, 2014 9:22 pm
by kyle.bong2@gmail.com
I am trying to figure what's the best way(standard) to detect when all box2d objects stop colliding. For example if I drop a box2d body onto a pile of body, how can i detect when all the collisions ended (or settled down)

I will take any ideas :)

Much Thanks!

Re: Best way to detect when all b2Body done colliding

Posted: Wed Jun 04, 2014 4:26 am
by iforce2d
You mean when they stop moving right? That's not the same as 'stop colliding' because they will still be colliding with each other if they are piled up.
How about checking the linear velocity of them, and if it is less than a threshold value you could consider the pile to be settled.

Re: Best way to detect when all b2Body done colliding

Posted: Wed Jun 04, 2014 5:26 am
by kyle.bong2@gmail.com
Correct I meant settled. Thanks for the help! I will give it a try