# DoN's 3D-Pathfinding / Flying-AI system (with full source!)

**URL:** <https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271>\
**Category:** World Creation\
**Tags:** unreal-engine\
**Created:** [March 4, 2016, 6:41pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271 "2016-03-04T18:41:32Z")\
**Posts on this page:** 20\
**Page:** 16

<div class="post-metadata">

**Author:** ![Angius](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/angius/32/465528_2.png) [@Angius](https://forums.unrealengine.com/u/Angius)\
**Post date:** [September 13, 2018, 9:39am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/311 "2018-09-13T09:39:33Z")

</div>

> [@TriConsulting](#):
>
> while navmeshes work I am looking for a more optimized approach for NPC movement.

I don’t think voxel based, full-3D navmesh is any more optimized than a regular, tri-based 2D one. Quite the contrary, in fact.

---

<div class="post-metadata">

**Author:** ![Reaver47](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Reaver47](https://forums.unrealengine.com/u/Reaver47)\
**Post date:** [October 22, 2018, 2:44pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/312 "2018-10-22T14:44:41Z")

</div>

Hi ,  
first of all thanks to bring us this amazing plugin, it’s awesome.  
I used for some tests on 4.18 and it work perfectly, but yesterday i try it on 4.20 and now if a pawn exit from the nav bound and call the FlyTo node in the Behaviour Tree the editor crash with this exception:  
Access violation - code c0000005 (first/second not available) There is something i can do for fix it? Thanks

---

<div class="post-metadata">

**Author:** ![Sitrec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sitrec](https://forums.unrealengine.com/u/Sitrec)\
**Post date:** [November 18, 2018, 4:45pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/313 "2018-11-18T16:45:18Z")

</div>

Hi, any news on a 4.21 version?

Thanks!

---

<div class="post-metadata">

**Author:** ![Feng\_Meow](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Feng\_Meow](https://forums.unrealengine.com/u/Feng_Meow)\
**Post date:** [January 3, 2019, 3:32pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/314 "2019-01-03T15:32:12Z")

</div>

Wondering if there’s a trick I’m missing in getting the flying unit to navigate correctly to a moving target point, such as the player.

Currently I’m spawning a Target Point at the player’s socket location. Then using the FlyTo node to fly an actor, however the actors seem to orbit a random amount of times before straightening out, and I’m wondering if there’s a setting I’m missing to have the target point be spawned or moving.

---

<div class="post-metadata">

**Author:** ![Cucharon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cucharon](https://forums.unrealengine.com/u/Cucharon)\
**Post date:** [January 16, 2019, 8:35pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/315 "2019-01-16T20:35:48Z")

</div>

Is there any function like AI Move To (I mean in the blueprint, not in the BT)? Or must be programed manually using Schedule Pathfinding Task?

Thank you.

---

<div class="post-metadata">

**Author:** ![Tinhauser](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tinhauser](https://forums.unrealengine.com/u/Tinhauser)\
**Post date:** [February 7, 2019, 9:11pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/316 "2019-02-07T21:11:26Z")

</div>

I am trying to figure out if I need this. I need a flying AI that can chase a point in 3D space, this point will be moving, because it’s attached to the player, who is also flying. I don’t need any obstacle avoidance. I would like to use behavior tree.

I have this installed and it can move the AI, but I feel like I want to just have 1 gigantic voxel and disable obstacle avoidance/pathfinding. I only need to go straight and the maps are big (over 100km).

Should I just use waypoints?

---

<div class="post-metadata">

**Author:** ![Thunder\_Owl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thunder\_Owl](https://forums.unrealengine.com/u/Thunder_Owl)\
**Post date:** [February 10, 2019, 7:41am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/317 "2019-02-10T07:41:39Z")

</div>

> [@Tinhauser](#):
>
> I am trying to figure out if I need this. I need a flying AI that can chase a point in 3D space, this point will be moving, because it’s attached to the player, who is also flying. I don’t need any obstacle avoidance. I would like to use behavior tree.
> 
> I have this installed and it can move the AI, but I feel like I want to just have 1 gigantic voxel and disable obstacle avoidance/pathfinding. I only need to go straight and the maps are big (over 100km).
> 
> Should I just use waypoints?

You just need to give that AI flyer direction vector to player (or point attached to player) all the time. Like in picture. You can add speed changes depending on distance if you wish, also some “too close” distance limit check (not in pic):

 ![Rotation-to-Player.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/0/b0c427c8f1e34ec7a184bab60a3654eb44965486.jpeg)

---

<div class="post-metadata">

**Author:** ![Harsh\_Bakshi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Harsh\_Bakshi](https://forums.unrealengine.com/u/Harsh_Bakshi)\
**Post date:** [March 27, 2019, 7:48pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/318 "2019-03-27T19:48:29Z")

</div>

Here is the image to the picture.

[[Album] imgur.com ![](https://i.imgur.com/1Kdii26.jpeg?fb "imgur.com") ](https://imgur.com/a/WHygKT2)

Everything is set up correct and neat, Also the Behaviour tree goes through Fly To Node, but still, my mesh doesn’t fly to the given location. Help me out  
Thanks. 🙂

---

<div class="post-metadata">

**Author:** ![DomusLudus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/domusludus/32/1215140_2.png) [@DomusLudus](https://forums.unrealengine.com/u/DomusLudus)\
**Post date:** [March 31, 2019, 7:42pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/319 "2019-03-31T19:42:52Z")

</div>

umm Hi, thanks for the plugin but…

in .4.20, “is location within navigable World” blueprint node always return true, is it a bug?

 ![reCapture.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/8/f88235df4f58231d339ba21b2781ca66fde44899.jpeg)

---

<div class="post-metadata">

**Author:** ![DomusLudus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/domusludus/32/1215140_2.png) [@DomusLudus](https://forums.unrealengine.com/u/DomusLudus)\
**Post date:** [April 1, 2019, 6:42pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/320 "2019-04-01T18:42:40Z")

</div>

Otherwise the navigation is blocked with triggers and is not able to pass through.  
and the clamp function does not clap to the nearest site

Is it all like this, or I have not known how to use it?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e668134d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e668134d](https://forums.unrealengine.com/u/anonymous_user_e668134d)\
**Post date:** [June 13, 2019, 6:08am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/322 "2019-06-13T06:08:58Z")

</div>

Hi. Yesterday got a bunch of crashes using FlyTo in nested BTs (run behaviour) in FlyTo::OnBlackboardValueChange. Looks like slight miss of nullptr check, but it helped. The nullptr hit was at myMemory-\>BBObserverDelegateHandle.Reset();

---

<div class="post-metadata">

**Author:** ![CrazyCatDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrazyCatDev](https://forums.unrealengine.com/u/CrazyCatDev)\
**Post date:** [June 19, 2019, 1:44pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/323 "2019-06-19T13:44:58Z")

</div>

Greetings! A big thank you for giving out your hard work for free to budding developers!

I know essentially nothing about C++, compiling, editing files, etc (I work 100% in blueprint) and I was wondering if you could help me make a change to the source code.

Essentially all I am after is a way to add a small delay in the “Fly To” node whenever the actor reaches the end of a straight line (so taking corners, changing direction, etc). I have my behaviour tree working as I’d like so far with a helicopter that rotates towards it’s velocity direction, however the sudden changes in direction during pathfinding make the whole thing look haphazard.

I’ve taken a look at the source files, but as I’ve said I know nothing about C++. I tried making some changes (to menu names only, nothing major) but then couldn’t get UE4 to compile with my changes. 😕

Any help from anyone in this thread is much appreciated!

---

<div class="post-metadata">

**Author:** ![X\_Starter\_X](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/x_starter_x/32/590039_2.png) [@X\_Starter\_X](https://forums.unrealengine.com/u/X_Starter_X)\
**Post date:** [September 23, 2019, 6:15am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/326 "2019-09-23T06:15:28Z")

</div>

Hey! How soon will the plugin be available for version 4.23?

---

<div class="post-metadata">

**Author:** ![dtamas80](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dtamas80](https://forums.unrealengine.com/u/dtamas80)\
**Post date:** [October 22, 2019, 4:16pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/327 "2019-10-22T16:16:48Z")

</div>

Someone knows anything about the upgrade for 4.23? It will be very important for me.

---

<div class="post-metadata">

**Author:** ![gothicserpent](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gothicserpent/32/896180_2.png) [@gothicserpent](https://forums.unrealengine.com/u/gothicserpent)\
**Post date:** [December 28, 2019, 12:53pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/328 "2019-12-28T12:53:30Z")

</div>

Creator of this plugin, you aren’t initializing your variables in DonNavigationManager.h properly and I kept getting warnings. Please change these lines to prevent the initialization warnings. Thanks for your work!

\Plugins\DonAINavigation\Source\DonAINavigation\Classes\DonNavigationManager.h : 365

FVector Origin;

to

FVector Origin = FVector(0.0f, 0.0f, 0.0f);

\Plugins\DonAINavigation\Source\DonAINavigation\Classes\DonNavigationManager.h : 368

FVector Destination;

to

FVector Destination = FVector(0.0f, 0.0f, 0.0f);

---

<div class="post-metadata">

**Author:** ![Golden4o](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Golden4o](https://forums.unrealengine.com/u/Golden4o)\
**Post date:** [January 7, 2020, 6:29am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/329 "2020-01-07T06:29:50Z")

</div>

Any update for 4.24?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_95ae57bb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_95ae57bb](https://forums.unrealengine.com/u/anonymous_user_95ae57bb)\
**Post date:** [February 2, 2020, 5:50pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/330 "2020-02-02T17:50:00Z")

</div>

Is the developer dead?

---

<div class="post-metadata">

**Author:** ![Thunder\_Owl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thunder\_Owl](https://forums.unrealengine.com/u/Thunder_Owl)\
**Post date:** [February 12, 2020, 6:15am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/331 "2020-02-12T06:15:55Z")

</div>

Please, if possible, someone re-make this for 4.24+ ? Thank You…

---

<div class="post-metadata">

**Author:** ![rasamaya](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rasamaya](https://forums.unrealengine.com/u/rasamaya)\
**Post date:** [March 27, 2020, 5:38pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/333 "2020-03-27T17:38:04Z")

</div>

It updates to 4.24 fine, I got everything working after transferring input ini. (was to lazy to update settings hahahaha). Everything works as expected. I have not tried packaging yet though.(if fails may need to toss the plugins intermediate and rebuild etc).  
Anyone using this for non-BT AI? I am scrapping all behaviour trees and going to attempt a Utility AI BP. Would to love to hear anyones experience with doing this.

---

<div class="post-metadata">

**Author:** ![rasamaya](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rasamaya](https://forums.unrealengine.com/u/rasamaya)\
**Post date:** [March 27, 2020, 5:47pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/334 "2020-03-27T17:47:42Z")

</div>

> [@anonymous\_user\_0d31d05f](#):
>
> I see thanks. By the way, it seems like DoN’s 3D-Pathfinding doesn’t support Physics volume? If the Physics volume overlaps with the Don’s Navigation Manager, the pawn/character won’t move.  
> FYI, both “FindGoal” and “FlyTo” nodes in Behavior tree continuously flashes when Don’s Navigation manager overlaps with Physics volume. If not, “FindGoal” is supposed to finish before “FlyTo”.
> 
> Update:
> 
> These errors will pop up:  
> DoNNavigationLog: Warning: Pawn’s initial/final position overlaps an obstacle. Attempting to find substitute vector (a nearby free spot) for pathfinding…  
> DoNNavigationLog: Error: Error: Invalid Origin (X=820.000 Y=810.000 Z=398.000) passed to navigation path solver  
> DoNNavigationLog: Error: Error: Invalid Destination (X=210.000 Y=-10760.000 Z=2000.000) passed to navigation path solver
> 
> Is the Don’s Navigation Manager treating the physics volume as an obstacle?

You can have the physics volume be there and not be evaluated within the DonManagerBounds. I have crazy anti gravity physics working well with this plugin.

[Previous page](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271.md?page=15)

[Next page](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271.md?page=17)
