title: Ball freezes at the bottom of the screen and vibrates
body: <p>Here is my code:</p>
  
  <pre><code>if (ball.position.y  &lt; 0 || ball.position.y &gt; size.height) {
      ball_speed.y *= -1;
  }
      if (ball.position.x  &lt; 0 || ball.position.x &gt; size.width) {
      ball_speed.x *= -1;
  }
  </code></pre>
  
  <p>I am making my game in cocos2d, ball is a sprite and ball_speed is a CGPoint. What happens sometimes the ball freezes at the edge of the screen and just vibrates. Could anyone help me on this it would be appreciated. </p>