Hey, I have a simple problem, but I am not able to find a solution with the little knowledge about Godot, that I have so far:
I want to create a simple ball-and-paddle game like "DX-Ball" just to get used to Godot. That means, I have a Ball and several Bricks in my Scene. If the Ball hits the Brick it should be destroyed and and Ball should change the direction of its movement depending on where exactly it hit a Brick.
The problem is now:
I want to let the game recognizing a hit via "area-shape-entered". if the Ball enters any area shape of the brick, the Brick should be destroyed (I guess via "queue_free()") and the Ball should change its movement direction.
But if I have more than one Brick and connect the "area-shape-entered" signal of the Ball to every Brick, than of course the Signal is emitted to every Brick as soon as the Ball enters one of the Bricks areas and all Bricks are destroyed().
If I do it the other way round and connect the "area-shape-entered" signal from the Brick to the Ball, I don't know how to tell the Brick that it should be destroyed, because the function is in the Script that belongs to the Ball. I tried to emit then another signal out to the Bricks, but in the end I again run into the problem that alle Bricks vanish as soon as the first Brick-area was entered.
So how can I connect the single Bricks to the Ball and apply "queue_free()" only to the Brick-Area that was entered?