Make a walkable character fly?

I am trying to do an enemy which is a possessed doll, and what I am trying to make it head to random areas in the navigation mesh.

The problem is that even though I have all the necessary tasks in its AI for it to move to random locations, it doesnt move to the sky even though I have turned can fly as on, set the modes to flying, tried with a ragdoll as well, none of them works. Anyone can direct me to the right place? I tried Peter L.Newton tutorials but that is for flying spaceships, mine is a walkable character that flies to random places inside the nagivation mesh. Many thanks in advance

Bumping Question.

No flying pathfinding, but some alternate ways to achieve this.

Create custom task, FindFlyingLoc. create custom blueprint child of TargetPoint, named something like FlightPoint. Scatter flight points in your level where you want your enemy to go to. In custom task ‘FindFlyingLoc’, get all actors of class ‘FlightPoint’ and build a list of vectors created from locations for each FlightPoint. get one at random, assign to blackboard value.

Create custom task, FlytoLocation. Get blackboard value from previous step, grab owning AI, and add movement input toward blackboard value. Depending on your AI decision making, you’ll want to do a destinationReached check as well somewhere.

Obstacle avoidance is more complicated, but depends heavily on your environment design.

Is there any tick boxes I should do in my character other than CanFly?

you can grab your character movement component, drag the pin out and set character state to flying as well, but yes, that first bool also needs to be set.

Many thanks. I will try this and let you know. It’s a shame they haven’t done pathfinding for flying pawns though :confused:

FlightLocation posted by UpARiver | blueprintUE | PasteBin For Unreal Engine I have tried to do this task, and I feel like I am not doing nothing wrong, I have a move to task after this one which should make the character move, but it doesn’t move at all :confused:

EDIT: I have got it working. Apparently there is a limit to how high your character can be and how high your target points can be. So basically, dont set them up too high, and if you’re looking to a random location task for your AI, here is how I’ve done it(following paradoc’s advices):

Many thanks Paradoc!!! :smiley: