But how would I find out what the angle is in the first place? The ball is moving by an x and y velocity vector.
If the ball hits a part of the screen either the x or the y vector flips.
How does the program know what the angle of the ball is when it makes a collision. How does the program know when two balls have collided into each other? they are two circles goverened under the same Type code, so their scripts run at the same time. How do they know they have collided when they are the same?
If the ball hits a part of the screen either the x or the y vector flips.
How does the program know what the angle of the ball is when it makes a collision. How does the program know when two balls have collided into each other? they are two circles goverened under the same Type code, so their scripts run at the same time. How do they know they have collided when they are the same?