Hey guys. I’m working on the collision detection for my brickbreaker game. Originally, I was just checking if the rectangles of the ball and the brick overlapped…As you can imagine, this won’t work, so it’s time to upgrade and fix it. I’m wondering what the best way to implement it would be…I was in the process of doing
if (ballRect.x >=brick.brickRect.x && ballRect.x <=brick.brickRect.x && ballRect.y >=brick.brickRect.y && ballRect.y <= brick.brickRect.y )
But there has to be a better way…plus that way isn’t working lol