title: Sprite Kit - Resting physics body object at correct collision contact point
body: <p>I am trying to make a game about balls and using sprite kit with physics body for IOS 7. My problem is about resting objects when contact / collide. Here is my code in <code>didBeginContact</code>:</p>
  
  <pre><code>[contact.bodyA setVelocity:CGVectorMake(0, 0)];
  [contact.bodyB setVelocity:CGVectorMake(0, 0)];
  contact.bodyA.resting = YES;
  contact.bodyB.resting = YES;
  </code></pre>
  
  <p>Actually <code>contact.bodyA</code> is already resting but I just set it to make sure both objects are set to resting. The problem is, balls are not touching to each other even if I set <code>contact.bodyA(or B).resting = YES</code>.</p>
  
  <p>This is what I want:</p>
  
  <p><a href="http://i.stack.imgur.com/p8JTk.png" rel="nofollow">http://i.stack.imgur.com/p8JTk.png</a></p>
  
  <p>This is what happening sometimes:</p>
  
  <p><a href="http://i.stack.imgur.com/LWORO.png" rel="nofollow">http://i.stack.imgur.com/LWORO.png</a></p>
  
  <p>As you can see in second picture, the blue ball is a bit far from other balls. Is there any other way to magnet the ball at contact point always?</p>