In a game im developing in 2D, im have one or more circles (balls) that can collide with several rectangles (bricks).
Im trying to figure out a collision detection strategy, and have come up with the following plan.
For each loop of the game ticker get the x,y point of the start and destination of the ball.
Form a rectangle (blue color in fig1.) at the start and dest point that has the balls rotation as well as setting the rectangle width as the balls radius times two.
check if the rectangle intersects with anyting in the play area using Separation of Axis
if the balls path, defined trough the rectangle intersects with anything in the play area, move the ball to the collision point, and after setting a new start and dest point, rerun from point 2 for as long as there are collisions or the ball has not travelled 100% of its planned distance.
With this strategy i can have collision detection with high ball speeds as well as high precision.
Im a quite new to game development so theres a high probability that im overdoing this, and that there probably exists alternatives to this. Any help/insight on this is greatly appreciated.