Is it possible to make a flying AI

Hey @Lily88777!

Check out this post of mine where I cover roaming on a floating pawn :star_struck:

When it comes to chasing and attacking the player, I wouldn’t recommend using a behavior tree if that’s all it’s gonna do. Building onto my blueprint code in the linked post, you can add a Branch node after Event Tick right before the Add Movement Input node that checks if the distance between the actor and the player pawn is less than a certain value, or you can also do a line trace to check if there are any obstructions, or check if the angle between the actor’s forward vector and the vector in between the actor and the player pawn is smaller than a certain value. And if the conditions you’ve determined are met, then redirect the execution flow from the already implemented roaming part to an upcoming chasing & attacking part using our Branch. In this new branch, once again use the Add Movement Input node but this time the World Direction pin is gonna be the player pawn’s location minus the actor’s location, normalized. And finally for attacking, you can either add a collision volume to your actor and check if it collides with the player pawn, or do a distance check right after our new Add Movement Input node. Then if the conditions are met, damage the player pawn however you handle it.

Sorry for having to explain the second part with text but I tried to make it as clear as possible. Still, feel free to get back to us if you have any trouble implementing it!

Hope this helps! :innocent: