I have a Ball.
Xpos = 10
Ypos = 10
function draw()
Xspeed = 5
Yspeed = 5
Xpos = Xpos + Xspeed
Ypos = Ypos + Yspeed
ellipse(Xpos, Ypos, 100)
end
If I have a line, that line could be anywhere with any slope, how would I make the ball bounce off of this line?
I have consulted my friends and they all are stumped, Help!