How to set up AI navigation for a flying drone/ helicopter type enemy?

I have looked online for tutorials on flying enemies, but I cannot seem to find out how to add navigation to prevent them from trying to fly through buildings and instead navigate around the map efficiently.

What I want to achieve is a gunship that circles the player occasionally strafing them with rockets and can navigate around levels that have a significant degree of verticality

There is a popular plugin: Don’s Flying AI.It may not be getting updates though. Personally I think you have to weigh up how much time it will take you to get used to 3rd-Party code, versus how much functionality or sophistication you actually need, versus how quickly it will take you to make your own purpose built system from scratch.

I use a very simple system. Its got 3 parts. The first is the movement code. It takes a point or vector and the ship moves straight to that point and hovers there for a time. The second part generates a list of target destinations to go to. This can be as crude as using a BP node to get a random point inside the bounds of the map, or it can involve a hard-coded list of strategic choke-points or key locations (observed from human player heat-zones). You can add a timeout in case the ship can’t make it there and then send it to a secondary target. The third part focuses on strategies for obstacle avoidance, or tracing against the world for level objects and other dynamic actors flying about.

You can have 100’s of these types of ships in a level doing dynamic tracing without FPS drops, so long as you keep the ship collision and mesh complexity as low as possible. You must also optimize the level collision itself (merge actors). There are lots of great threads on this topic if you invest some time (Flocking / RVO / A* pathing etc). Start by searching on Flying AI as a title keyword… BTW: You’ve been on the forums for a couple of years so you can probably answer other devs questions too occasionally. Otherwise if help is always one-way, the forums are just going to die.:wink:

Could you please send me some screenshots of these blueprints? Also If possible do you have any suggestions as to how to get the enemy to circle the player character?

Oh yes, I am not a fulltime dev and I think my suggestions would honestly cause more problems and annoyance as opposed to helping anyone. Sorry

Though I guess I could post how I cam up with my method of tank aiming (similar to WoT, Warthunder or AW), the one thing I came up with that I think could be useful. I guess I could show that off if anyone wanted me to.

I’m trying to think of where you can find useful samples or where I started off from. Here or from AI samples here.
My own BP has multiplayer / combat and lots of extra code for edge cases, so too much to simplify / screenshot.
What devs typically do is ‘cannibalize’ BP code from threads & example projects and build up libraries over time.

There are many ways to hover around the player. Add a hidden spherical mesh to the player / get a random point inside…
Then navigate to the random point with a Timer. When the Timer goes off navigate to a new random point within the circle.
Or use the Get-Distance BP node to find a consistent point from the player center that’s within certain map / level bounds.

Actually it sounds like something that would help others…
Why not start a new thread and post in CommunityTools:wink:

Thank you I will take a look at the examples you gave.

I guess I will try post my tank aim system sometime, perhaps I should clean it up and label it first… It would be very nice to see fewer games using the horrible approach of simply limiting the maximum mouse input or lowering the sensitivity, franticly dragging your mouse across the desk repeatedly is no fun.

PS I posted a question a while back on how to add locational damage to tanks that is still unresolved, if you have time could you please take a look and see if you can come up with any suggestions, it is somewhat dead and I don’t want to spam posts to revive it.