Original Post
I am trying find a solution to the problem below. The problem is for a tech test in which we are allowed research the problem in order to find a solution. I am having some trouble trying to figure out what exactly the question is looking for. Given an initial shot position (Spos), a constant shot speed (Sspeed), an initial target position (Tpos), and a constant target velocity (speed + dir) (Tvel) derive the equation for calculating the shot direction (Sdir) such that at some time (t) the shot would hit the target. Be sure to derive an equation for t as well! Write a function to compute these values (Sdir and t). So far all I have come up with is: Tpos - Spos = Dif(the diffrence between the two points) if I normlize the diffrence will that give me the direction vector? And if so then All I would need to do is Dif / Sspeed = t? Thanks
