Targeting a vehicle with complex movement?
- by e100
Targeting a vehicle with known constant velocity is simple, and collision is guaranteed. Imprecise AI can be modeled by adding a small error factor.
But how would one go about targeting a vehicle whose movements are more complex? Perhaps it's evading the AI or another game object.
I've been thinking about how I'd do it myself in a FPS (in which bullets have finite speed) and think there might need to be at least couple of targeting modes based on the target's movement in the previous second or so:
If it's near linear (peak acceleration in a certain range) target with the linear model
If it's highly irregular (perhaps size of bounding box of recent positions could be used?) , target at an average
For now I can assume 2d space, AI is stationary and projectile moves linearly.