Vector math is not my strong suit, and would really appreciate some help trying to automatically calculate the speed of a projectile that I want to follow a parabola arch towards the player like this:

This is going to be setup on an enemy AI; I have a method that can calculate the horizontal distance and then sets a random value for height so there is a random element to the projectile, but I can’t find a way to calculate how fast the projectile will need to move in order to land on the designated target based on the random height element I want to add to this. Ideally, I want this attack to be timed, so that the time value will be constant in how long the projectile needs to travel, but as mentioned need help finetuning the speed value so it doesn’t fly too far away from the target or not far enough.

Is there anyone who has solved for this or understands this type of math well enough to steer me in the right direction?

Thanks!