Flying AI without a plugin

Hi, I’m having a difficult time understanding how to implement flying AI in my game. I’m working on a space shooter sim and would like to implement a flying AI enemy that could randomly patrol through space and approach you if you get within a distance, follow you and try to shoot you. I have found DoN’s flying AI plugin but haven’t got around it and would prefer to do this by blueprint. Thanks in advance.

Flying AI is pretty complex due to the 3D nature and the lack of built in functionality from UE4 since it was designed for FPS type games. So everything I have seen on the subject revolves around “you have to build it yourself”. With that being said, it has been a project of mine for a couple years now to try and figure this out and I can tell you from personal experience it is quite the challenge. I have created “AI” for aircraft and started from scratch over and over again. Currently this is as far as I have gotten, you can download my project for free through the links if you want to use this as a starting point. There are 2 types of AI in this project, the basic version just randomly patrols looking for the player and will fire if within range and attempt to follow the player around until it loses sight. The second one is a bit more advanced and will actually “track” the player movement for a time and then attempt to relocate the player and if it can, it will start another round of “tracking”. I have not implemented collision avoidance yet as I found this to be a simpler problem vs making the AI fly “smoothly” and without jerking. I have gotten prob 75% of the movement that I would like although it is not in the project link but if you want I can help you recreate the stuff I have been working on since the upload. Anyway, hope this helps and if you have any breakthroughs please share :slight_smile:

I recommend reading ‘The Nature of Code’ by Daniel Shiffman, particularly the autonomous agents section The Nature of Code. It should be pretty easy to port the code examples to UE4 in either blueprints or C++.

CHECK OUT MY SOLUTIONS https://www.youtube.com/playlist?list=PL1lwA_g8dnUMFqFJ0UxjQcLxAC29Fwpre**UNDER EACH VIDEO THERE IS A LINK TO THE PROJECT**

This is late but here’s a tutorial for a blueprint setup that gets the job done

Sorry for the late replies, but thank you for your answers!