I'm building a game with players and missiles.
I want to fire a missile from P1 to P2. The missile should always take exactly five seconds to reach P2. The missile should also track P2. If P2 moves farther away, the missile must speed up to satisfy the timing constraint. If P2 moves left, the missile must move left (and change speed as well). If P2 moves closer to P1, the missile must slow down.
Is this possible? What's the best way to accomplish this?
I don't currently have a Vector2D class (this isn't actually a game, but the analogy works well), so if possible, I'd like a solution that doesn't require one.
Edit: This isn't actually a missile either. :)