Creating an Enemy Jet AI

Hello, I have a question.

I tried to look for resources and information over the internet, and I couldn’t find anything useful.

The issue is, that I don’t know how to implement my thoughts, I mean, the AI will have a switch case which, he could:

  • Seek/Scan/Normal : The normal state,
    the jet is flying around.

  • Chase and Shoot: The AI is triggered
    and trying to kill the player.

  • Flee : The AI will try to shake off the player jet.

I’m trying to think of which of the Unity3D tools I can use to execute my thoughts.
The Lerp or Slerp would make a “Un-real” movement if suddenly the enemy jet would turn without physics movement…

Do you have any ideas?

If you look in the standard assets, there’s a script called a character motor. It basically does all the movement, without any AI or input whatsoever. This is what you need for your jet.

Of course, your jets are not bipedal creatures. You will have to make a custom one specifically for an aircraft. This will give the player and the AIs realistic (or at least similar, depending on how well you write it) movement. Then you can make a separate script that deals with the player’s input and the enemy AI.

I hope this helps! :slight_smile: