I'm writing a breakout-style game. I came to write the movement of the ball yesterday and realised I don't know how to. The approach I tried was to associate a angle and speed with the ball. I defined 0 degrees to be straight up and 90 is east etc. Given this though I'm not sure how to work out how to move the ball. For example,
My ball is sitting at 0,0 and it has a speed of 10 and an angle of 45 degrees - how do I calculate where I should move to?
Sin = Opposite/Hypotenues
Cos = Adjacent/Hypotenues
Tangent = Opposite/Adjacent.
If moving from x1, y1 to x2, y2 then delta X is the adjacent, delta Y is the opposite, and the line from x1,y1 to x2,2 itself is the