I have an enemy AI aircraft that follows a spline path. I’d like the AI to be able to shoot back when I’m in it’s sight radius and at a certain distance.
The AI needs to be constantly following the path, so it cannot alter course to pursue me or it’s other targets. It’s ok if it misses, it doesn’t really need to be accurate. This game is more about me shooting them down than the other way around.
Imagine it’s like a strafing run. The plane comes, fires a few bullets, stops firing and moves along the spline, as it loops around, go in for another pass of bullet firing.
I was thinking of maybe doing pawn sense, so that there is a clear cone or frustum in which the AI can see, then only shooting whenever I pop into that sight radius.
I’m not sure if AI perception will work, since that’s mostly focused on free roaming AI, not for those following a path.
I’d love to hear some suggestions on the best way to approach this. Remember it doesn’t need to be crazy accurate.