How do I calculate projectile motion between two coordinates?
I'm working on a simple projectile motion system and I'm trying to calculate the trajectory between two points.
I know the starting position (x1, y1) and the target position (x2, y2), but I don't know the launch angle or the initial velocity. The start and target positions can change every time, so I can't use fixed values.
What is the best mathematical approach or algorithm to calculate the correct launch angle and speed so the projectile reaches the target accurately? If there are multiple solutions or common methods, I'd appreciate an explanation or an example.
Thank you!
