Note the following question is for the purposes of animation projectiles in a game im doing. However, i believe the question itself is correctly asked on this stack.
I have a vector that goes from x/y 45/45 to 90/90. This vector is used to draw the position of an object over the course of several frames. In this particular example, the animation is done within 60 Frames, im calling the frame counter t (it is an array, so im writing it like current/max, i.e. 0/60 up to 60/60).
When t is 0/60, the object is at 45/45, when t is at 60/60, the object is at 90/90. So within 60 frames/steps the object is moving along its vector, gradually from 45/45 90/90. Its speed is constant, based on the projectile (so for a fast projectile, t will be less than 60 steps while for a slow projectile, t might be above 60 steps).
However, i have a second vector, originating at possibly any point and i need to create an animation (=vector x/y and t) that is intercepting the above vector. Again, the speed (and therefor t) of the intercepting vector can be anything and i have no idea how i would calculate the actual point of interception/Impact in a fashion that would result in a correct animation.
Right now, my "intercepting" vector picks a random point onwards the intercepted vector, however by the time the intercepting bullet hits the intercepted vector, the intercepted projectile is either far gone, or not there yet.
What kind of math would allow me to to calculate an exact point of interception, so intercepting and intercepted projectile "meet" at the same point, along a random point of the intercepted vector ?
As a specific example, assume the origin of the intercepting vector is on 45/80 and you can pick a speed (-> max t) of your choice. The interception should, if possible, happen at any point once the to-be intercepted vector has reached 50 % of it's t.