This question already has an answer here:
This is a pretty easy question, but I can't quite figure out the answer. I have:
- The initial position of a projectile.
- The gravity vector.
- The (stationary) target I want to hit.
- A maximum launch speed of the projectile.
I want to calculate the initial velocity the projectile must be launched at to hit the target, assuming it follows a ballistic trajectory.