The tricky part in lead pursuit algorithms comes when the target is moving at an angle to the missile. The distance to the location of the target at the time of impact cannot be exactly calculated until you know the point of impact, and you don't know the point until you know the distance! Weird, huh?
A way to guesstimate it is to make multiple iterations, getting closer and closer to the actual point of impact after each iteration, but not without the cost in code performance.
It can be calculated precisely in one iteration, but it takes more than simple high school math to do so. Any takers?
:)
A way to guesstimate it is to make multiple iterations, getting closer and closer to the actual point of impact after each iteration, but not without the cost in code performance.
It can be calculated precisely in one iteration, but it takes more than simple high school math to do so. Any takers?
:)