SunFounder ESP32 Starter Kit
• Now let the Ball sprite move around the stage and bounce when it touches the edge, and you can click on the
green flag to see the effect.
• When the Ball sprite touches the Paddle sprite, do a reflection. The easy way to do this is to let the angle be
directly inverted, but then you’ll find that the path of the ball is completely fixed, which is too boring. Therefore,
we use the center of the two sprites to calculate and make the ball bounce in the opposite direction of the center
of the baffle.
604 Chapter 4. Play with Scratch