title: How to know body is in rest in Libdx?
body: <p>I just want to remove the bodies when they come to state of rest from motion?i have tried using body.isAwake()   </p>
  
  <pre><code>if (TimeUtils.millis()-lastDropTime&gt;1000) dropBall();//creating new body every 1 sec
            //iterate over all the bodies
          Iterator&lt;Body&gt; iterator = ballBodies.iterator();
          while (iterator.hasNext()) {
             Body body = iterator.next();
            if(body.isAwake()==false){
                world.destroyBody(body);
                  iterator.remove();
              }
          }
  </code></pre>
  
  <p>but this is not working</p>