- Home /
how to find rigid bodies rested in ground?
Hi all,
I'm getting trouble in find the all rigid bodies rested with ground... here what am doing is , in my game play i have constructed a wall and hitting that with a bullet. the wall's bodies are rigid bodies and collider attached. the user will hit the bullet through on touch and it'll hit on the wall. after hitting the wall sure it'll get scattered. sure all the bodies will move up and down because of rigid body. now i need to find all those scattered bodies are rested on the ground with out a single movement on bodies.
after that, if the all bodies are rested on ground i need to move the camera...
i have tried with rigid body.velocity.y == 0 and rigid body.useFriction method .. but no luck.. there is movements on bodies whether the velocity come to zero.
how can i solve this. any quick help...
Thanks in advance.
I'm not sure if similar logic would apply to rigidbodies as character controllers... but the standard assets character controller script has an isGrounded check, perhaps you could get some inspiration from there?
Nope mr.timsk... the rigid body is different from character controller....
I know they are different ;).I was thinking that the logic needed to get the functionality your looking for would be similar.
ya thats correct for character controller....the rigid bodies will fall on the ground should be fine..am not asking about that if a body felt down after that another body will fall on that like 3 or 4 bodies are falling... there 'll be a some shakes should occur on the bodies right? am asking how to find those shakes getting stop(there is no movement on bodies)...it should be rest any where ground or else another body... i hope you'll get my point?
Your answer
![](https://koobas.hobune.stream/wayback/20220612234541im_/https://answers.unity.com/themes/thub/images/avi.jpg)