Flying AI MoveTo without NavMesh

Wondering if anyone has ideas about a simple way how to move an AI without NavMesh in a custom Behaviour Tree Task that behaves like AI Moveto (i.e., a Flying AI MoveTo). I would rather avoid using any of the 3D NavMesh Plugins - but the issue I’ve run into is that latent MoveTo nodes (e.g., below) do not execute without a NavMesh even if “Use Pathfinding” is disabled.

image

I feel there should be a simple way to move a character from one spot to another along a straight line using a Latent node and their character movement speed, but I can’t seem to find it. I don’t need collision detection or pathfinding.

Just a simple FlyingMoveTo that behaves kind of the same way as AI MoveTo (it’s fine if the AI bumps into things - but the behaviour task should not finish execution until the AI has either reached, or failed to reach, the destination).

I have found some plugins and other tools that work but mostly rely on adding velocity and re-executing the task again, which is annoying to work with because the task reports that it has finished executing when it really hasn’t reached (or failed to reach) the target location yet.

You can generate the path points in 3d space and use them to travel to the destination.

Right from the original post:

I would rather avoid using any of the 3D NavMesh Plugins’

It is just overkill for what I require.

Well there are no built in solutions that will help you out.
There is no 3d pathfinding for flying movement.

You could do a sphere cast in front of your drone or multiple linecasts in the form of sensors to try to dynamically navigate the area but it seems higher overkill than any nav plugin.

I am not sure why the hostile / off-topic response, I did specifically say that I wanted a solution WITHOUT navigation. I am not sure how much more clearly I can spell out that 3D pathfinding is not what I am looking for. even bolded this to make sure it could not be missed, but somehow you still did not even read the question in full enough to see this.

Then you will need to build a suite of sensors that will measure the distance and direction to obstacles and based on these parameters call specific functions to rotate the flying pawn towards any viable exit / path. The problem arises when you have more complicated areas to traverse.

As for the plugin that i mentioned, it does not use NavMesh but a dynamic grid system that does not require any predefined paths, but it creates it’s own volumes. So it does not qualify for the exclusion that you mentioned.

Again - not what I asked, and no I do not need this for my use case.

I think you can use the BT task Move Directly To to just interpolate to the location

haha this is the challenge…Unfortunately MoveToDirectly does seem to require NavMesh.

I agree it shouldn’t - but I have not managed to get it working without, even with all of the settings that would seem to require it disabled.

Maybe there is a setting I am missing that’s required for this to work - but I have not managed to get MoveToDirectly to work this way

Perhaps you can use MoveComponentTo then, and do some math to determine the duration based on the character’s speed and the distance


vs project with custom async nodes.
FlyMove.zip (40.7 KB)

This is it <3 Cheers. I will look into it today, I didn’t have time to download yet but the behaviour looks right, really appreciate it. Bless

Really wish I could have made it a little cleaner though. Async functions can’t update object’s position directly even trying to call the game thread, so the update itself still lives in the actor, but you do get ok flow control from the asnyc.

That’s ok; I’ll investigate later but other solutions I have seen elsewhere have taken advantage of custom behaviour tasks that execute and return finish execute AI prematurely because of the lack of latent flying MoveTo without NavMesh, which is a huge pain for integrating them into behaviour trees. So this will be much better

You can make a UAITask child, which runs on the AI controller and can tick, should be better than a general async task for this

I will have a look on the weekend. At a glance it seems like I’d need to create a UAITask and expose it the the behavior tree via a an inheritance of UBTTask_BlackboardBase.

Only downside of UAITask that looks to be behavior tree oriented, unless I can call it for instance from a static function from a library to use it elsewhere.

I’ll need some time to dig into what is bare bone needed and what is fluff and boilerplate spaghetti code.

have you tried Move to location node?it doesn’t need a navmesh.but it needs a movement component,either character movement component,or floating movement component.

here is a thread that may include information you want