I have a parabole:

Now, from point A i want to shoot an object which would follow the parabole's path. The object moves with constant horizontal speed and a constant vertical gravity is applied to it per step (in the usual game environment, no fancy physics). In other words, the object has four properties (x, y, horizontalSpeed and verticalSpeed) and every step its action looks like this:
x += horizontalSpeed; y += verticalSpeed; verticalSpeed += gravity; //In my case gravity is equal to 0.2
and the variables are set to:
x = A.x; y = A.y; horizontalSpeed = cos(angle)*speed; verticalSpeed = sin(angle)*speed;
I can get the angle of movement but no luck finding the speed/velocity, and I am fairly sure there has to be some formula to do get it. The "data" I have is:
A point's X and Y,
Parabola's vertice's X and Y,
a, b and c (from ax^2 + bx +c) of the parabola
I think that would be all. Thanks in advance! I will try to get the solution (again) by myself now :).


Sign In
Create Account


Back to top









