How to get vertical movement between points?

So I’m trying to create a flying AI that can determine the best route to fly to a specified position while also being wary of the level’s geometry. I tried the default AI Path component, but then it just stays on the ground, unwilling to move upwards. I then tried creating my own script, that had it move in the direction of the transform through AddRelativeForce, which somewhat worked, but then I came across many issues trying to hook up a lot of the other backend stuff that’s taken care of in the pre-provided scripts.

Ideally, if there’s a way I could edit the base scripts as opposed to having to create my own, that would be preferable, but I’m open to anything. Is what I’m doing feasible? Am I just missing some key component here? Any help would be appreciated.

Hi

All the included movement scripts assume ground based movement, 3D movement is very different and not something that they provide. You could take a look at the tutorial for writing a custom movement script: https://arongranberg.com/astar/docs/custom_movement_script.html.
Note that full 3D pathfinding can only be accomplished using a point graph at the moment, all other graph types assume ground based movement.

1 Like