This example demonstrates, with commented code, how to calculate collision between a circle and a straight line, and how to calculate the reflected angle (bounce). Click either side of the screen to move the left/right anchor of the straight line. This example project was brought on by this question: https://scratch.mit.edu/studios/25643089/comments/#comments-295838618 All code by me (@kriblo).