Lets say I have an angle… what would be a reasonable way to go about finding the next point of where the ball would be?
Variables: bSpeed, bAngle, Ball.x, Ball.y
You knwon when you do c^2 = a^2 + b^2… is there a way you could find how long c^2 could be and actually “draw” it out and then use speed to go only part of that… with that find a^2 and b^2 so you can actually have a x and a y to draw the ball…
Thanks ahead of time! (BTW, I don’t need code… just reasoning and wisdom)
Your 4 variables are effectively a vector – where the vector is a measure of both direction and magnitude/velocity (i.e. what you’ve represented as bSpeed and bAngle). Using this representation means that Ball.x and Ball.y simply become the horizontal and vertical components of the vector.
Given a vector called v1 we can calculate the movement in the x and y axis as follows…
GPWiki (Games Programming Wiki) is a great resource for anything maths/physics for games development. Here’s a handy link to their vector page