Ok so i want my player to throw projectile that will arc and reach a certain mark , but i want it to change its speed, angle, and gravity according to how far it is from the mark that i chose.
i tried using the distance formula inorder to optimize it, but i faced some problems.
1) the projectile's speed is fast then slower as it is near the mark then faster again as it gets further from the mark, i dont want that, i want it to simply curve while getting slower.
2) since the projectile curves i needed it to have an angle that is higher than the one facing the mark however, at shorter distances it didn't need to be as much higher from the mark as in longer distances, i wasn't able to optimize it perfectly inorder to land o the mark.