Hi guys, newbie here,
So I was making a pong game, but for my work I find that the ball bounces of in an angle which is a little too predictable, which is the negative of the angle of incidence
the command I used was [set x-speed to [negate[x-speed of self]]
which means that my ball will only bounce off to -30 degrees if it comes from an angle of 30 degrees, it makes the game predictable, and boring. The worst is when to comes in at 0/180 degrees, the loop will go on forever.
So i would like to know, what can I do to alter the angle of the reflected ball randomly? Such as when the ball comes from an angle of 30 degrees, it has chance to bounce off towards -30 degrees, -45 degrees or -15 degrees.
I will appreciate any help, thank you