This deals with my ballistics formula. I found out how to solve for the speed!As far as I know, this formula does work properly. This formula only works if the surface the object is launched from and is flying over is flat. = Speed of projectile = Distance traveled = Gravity down force = Angle of the gun

That formula gives me the speed of the object as a scalar, as far as I know.

And this is what a friend had told me about how to get it as a vector

Would I be able to solve for the scalar velocity if I use the first equation as ?If this helps, here is what he had said:

you'll need first those values for calculationsAngle on which gun is pointing at(or range you want to, but then you'll need to decice wether the gun is in low/high angle)Speed of projectile(i don't think rockets will be easy to calculate)and Gravity strength(default = 9.8).

for now, i'll give an example. in this case, a gun firing a bullet in a 100 m/s velocity, 30 degrees angle of launch, and a 10 m/s² gravity acceleration(making it easier for you to understand).

you'll need to determine the range on which the projectile will land on.sin(30 degrees)*100 = 50 m/s Y velocity at launch.cos(30 degrees)*100 = 50*(3^0.5) x velocity at launch.next step is calculating flight time. in this case, (Y velocity / Gravity)*2(because your projectile will fall down too). with the specified conditions, this equals to a 10 second flight time.now, multiplying the X velocity by the flight time, you get a 500(3^0.5) meter flight distance**=Eliminating other factors, like air friction, and making sure the ground is flat.

Success! With the help of my friend who is amazing in calculus and trigonometry, I have done it!(except for air friction)

Solve for . In this case, we will use 100 as D and will be 30°

For clarity, we will switch the position of the variable.

Now that we have the speed as a magnitude, we can finally split it into and . We need to make sure that is always positive, otherwise, it will shoot the projectile downwards.

This means that you can calculate how fast a projectile needs to be moving given the angle of the gun and the distance between the gun and your target. These equations will give you the exact velocity it needs to be shot out. It is only exact if you were to shoot the projectile without any air friction. I'll keep this post updated seeing as most of you aren't that big on ballistics. I hope that this is okay to do. I hope that someone, other than me, will find this helpful.