### Godot Version

4.2.1

### Question

Hi everyone. I decided to make a arcanoid-type game to practice some game mechanics. I already have a ball, a platform, and bricks. It’s ok about ball touching a top or bottom of brick, I just reverse Y-axis. But things come more interesting then i decided to make a “side” collision from left and right of brick. Every element of a game is simple, it’s just mesh and collision shape. Ball is an Area2D, which emit signal about collision with any object.

Problem is that ball don’t know sizes and scale of brick, so I can’t calculate from which side collision happens. Are there any solutions about this problem?

P.S. I dont want to add another areas or collisionShapes to elements, I search for mathematical solution.

It could be easy to explain it with squared brick. With square i can normalize diff between positions of brick and ball and see, which side was collided. But I didnt see how to do it with scaled brick, then i dont know scale for each axis