# Flying AI MoveTo without NavMesh

**URL:** <https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228>\
**Category:** AI\
**Tags:** unreal-engine\
**Created:** [July 22, 2024, 4:43pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228 "2024-07-22T16:43:53Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krabworks](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krabworks/32/1194549_2.png) [@Krabworks](https://forums.unrealengine.com/u/Krabworks)\
**Post date:** [July 22, 2024, 4:43pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/1 "2024-07-22T16:43:53Z")

</div>

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](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/6/03603d40d747eb59357c10ae5f635aa2fd2e4375.png)

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.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 22, 2024, 5:36pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/2 "2024-07-22T17:36:34Z")

</div>

> **[GitHub - VSZue/DonAINavigation: This plugin provides a 3D dynamic pathfinding...](https://github.com/VSZue/DonAINavigation)**
>
> This plugin provides a 3D dynamic pathfinding system for use with Unreal Engine 4. It's primarly designed for Flying AI creatures based in dynamic or procedural worlds that need to solve comple...

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

---

<div class="post-metadata">

**Author:** ![Krabworks](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krabworks/32/1194549_2.png) [@Krabworks](https://forums.unrealengine.com/u/Krabworks)\
**Post date:** [July 22, 2024, 5:48pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/3 "2024-07-22T17:48:16Z")

</div>

Right from the original post:

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

It is just overkill for what I require.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 22, 2024, 5:52pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/4 "2024-07-22T17:52:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Krabworks](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krabworks/32/1194549_2.png) [@Krabworks](https://forums.unrealengine.com/u/Krabworks)\
**Post date:** [July 22, 2024, 5:54pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/5 "2024-07-22T17:54:53Z")

</div>

> [@3dRaven](#):
>
> Well there are no built in solutions that will help you out.  
> There is no 3d pathfinding for flying movement.

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.

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 22, 2024, 5:59pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/6 "2024-07-22T17:59:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Krabworks](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krabworks/32/1194549_2.png) [@Krabworks](https://forums.unrealengine.com/u/Krabworks)\
**Post date:** [July 22, 2024, 6:03pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/7 "2024-07-22T18:03:18Z")

</div>

> [@3dRaven](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![zeaf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeaf/32/1108035_2.png) [@zeaf](https://forums.unrealengine.com/u/zeaf)\
**Post date:** [July 22, 2024, 6:05pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/8 "2024-07-22T18:05:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Krabworks](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krabworks/32/1194549_2.png) [@Krabworks](https://forums.unrealengine.com/u/Krabworks)\
**Post date:** [July 22, 2024, 6:11pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/9 "2024-07-22T18:11:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![zeaf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeaf/32/1108035_2.png) [@zeaf](https://forums.unrealengine.com/u/zeaf)\
**Post date:** [July 22, 2024, 6:13pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/10 "2024-07-22T18:13:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 23, 2024, 3:03am UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/11 "2024-07-23T03:03:06Z")

</div>

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/0/0f0806b7cadd4a9ccf7722876d8b04588e420d49.jpeg "moveToFly") ](https://www.youtube.com/watch?v=YgL8mPjujP4)

 ![fly1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/f/4/6f405b2f96b317adf8570f6ed746d9eedb977eba.png)  
vs project with custom async nodes.  
[FlyMove.zip](https://forums.unrealengine.com/uploads/short-url/mSMFD65MJ3peaJdLeWwKfxlT1Nu.zip) (40.7 KB)

---

<div class="post-metadata">

**Author:** ![Krabworks](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krabworks/32/1194549_2.png) [@Krabworks](https://forums.unrealengine.com/u/Krabworks)\
**Post date:** [July 24, 2024, 7:21pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/12 "2024-07-24T19:21:21Z")

</div>

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

 ![pope-francis-435-1-9fda04722c0c44138dfb8ef75949944c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/2/2b2b33e98022a827dada89077d2164a849d1dc11.jpeg)

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 24, 2024, 7:23pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/13 "2024-07-24T19:23:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Krabworks](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/krabworks/32/1194549_2.png) [@Krabworks](https://forums.unrealengine.com/u/Krabworks)\
**Post date:** [July 24, 2024, 7:25pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/14 "2024-07-24T19:25:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![zeaf](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zeaf/32/1108035_2.png) [@zeaf](https://forums.unrealengine.com/u/zeaf)\
**Post date:** [July 25, 2024, 6:20pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/15 "2024-07-25T18:20:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![3dRaven](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/3draven/32/906552_2.png) [@3dRaven](https://forums.unrealengine.com/u/3dRaven)\
**Post date:** [July 25, 2024, 11:24pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/16 "2024-07-25T23:24:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![baobao4435](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/baobao4435/32/950790_2.png) [@baobao4435](https://forums.unrealengine.com/u/baobao4435)\
**Post date:** [July 26, 2024, 3:10pm UTC](https://forums.unrealengine.com/t/flying-ai-moveto-without-navmesh/1946228/17 "2024-07-26T15:10:49Z")

</div>

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

> [@flying bird random fly](https://forums.unrealengine.com/t/flying-bird-random-fly/1875295/2):
>
> try to use “move to location” node ,it allows you to move the birds in the air,and doesn’t need a navmesh. And use “random unit vactor” to generate a random direction,then use that direction to fire a line trace(also a random length in a wanted range).and then if it hit something means that the the location is on the ground,we need to regenerate new location again. only when the line trace has hit nothing,we can use the line trace’s end location for the target location.
