Collision detection between ball and bricks in a brick game

How do you detect a collision between a ball and bricks in a brick breaker game?

+2
source share
1 answer

Block Collision Limit


This should get you started and give you some search terms. Essentially, you treat each brick as a bounding box. Based on the position of the ball, you should be able to determine if the ball collides, this is based on the fact that you consider the ball as a simple bounding box with a given height and width.

+2
source

Source: https://habr.com/ru/post/1307822/


All Articles