Right now, the ball bounces off the edge and ricochets off the paddle, but it continues passing through the bricks. We're going to change that behavior by making the ball bounce off the bricks. Let's follow the given steps:
Select the yellow brick sprite. Add a broadcast () block to the script that checks if the brick touches the ball, and create a new message called bounce. See the following screenshot:
Select the ball sprite, and add the when I receive block to the scripts area.
Attach a point in direction () block.
We're going to do a calculation inside the point in direction () block to redirect the ball back to the paddle. Add a multiplication (*) block from the Operators palette. Then...