
上QQ阅读APP看书,第一时间看更新
Beginning collision detection
We have checked the boundary of the playground when moving the ball in the previous section. Now, we can control the paddles with the keyboard and watch the ball move around the playground. What is missing now? We cannot interact with the ball. We control the paddles but the ball just passes through them as if they are not there. This is because we missed the collision detection between the paddles and the moving ball.