title: Collision detection working weirdly in Arkanoid style game
body: <p>This is my code for the ball collision in arkanoid:</p>
  
  <pre><code>Rectangle intersection = Rectangle.Intersect(block.Rect2D, ball.BallRec);
  
  if (intersection.Width &gt; intersection.Height)
  {
      ball.yVel = -ball.yVel;
  }
  else if (intersection.Width &lt; intersection.Height)
  {
      ball.xVel = -ball.xVel;
  }
  else
  {
      ball.xVel = -ball.xVel;
      ball.yVel = -ball.yVel;
  }
  </code></pre>
  
  <p>Unfortunately the ball sometimes "melts" into the blocks and bounces weirdly, especially when its at higher speed. How can I fix that?</p>