# 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:** 14

<div class="post-metadata">

**Author:** ![Ryan\_Darcey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Darcey](https://forums.unrealengine.com/u/Ryan_Darcey)\
**Post date:** [August 11, 2017, 7:31pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/266 "2017-08-11T19:31:06Z")

</div>

> [@;748836](#):
>
> [HR][/HR]  
> **4.17 ETA**
> 
> [HR][/HR]  
> Some major features and bugfixes are planned for 4.17 so I’ll need a couple of weeks to submit this to the marketplace.
> 
> Need to merge a fair amount of code from my local build for the plugin (where some new stuff has been brewing! :)) before I get to this…

🆒🆒🆒

---

<div class="post-metadata">

**Author:** ![Mr\_SquarePeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr\_SquarePeg](https://forums.unrealengine.com/u/Mr_SquarePeg)\
**Post date:** [August 15, 2017, 10:27pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/268 "2017-08-15T22:27:52Z")

</div>

> [@;748836](#):
>
> [HR][/HR]  
> **4.17 ETA**
> 
> [HR][/HR]  
> Some major features and bugfixes are planned for 4.17 so I’ll need a couple of weeks to submit this to the marketplace.
> 
> Need to merge a fair amount of code from my local build for the plugin (where some new stuff has been brewing! :)) before I get to this…

What improvements are you adding to the plugin if I may ask?

---

<div class="post-metadata">

**Author:** ![VSZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VSZ](https://forums.unrealengine.com/u/VSZ)\
**Post date:** [August 16, 2017, 7:39pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/269 "2017-08-16T19:39:06Z")

</div>

> [@HeadClot;750418](#):
>
> What improvements are you adding to the plugin if I may ask?

Performance and robustness are the two areas. Will share more details when it goes out 🙂

---

<div class="post-metadata">

**Author:** ![VSZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VSZ](https://forums.unrealengine.com/u/VSZ)\
**Post date:** [August 21, 2017, 8:26pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/270 "2017-08-21T20:26:05Z")

</div>

**Major Update & 4.17 release**

What’s New:

**Full Multi-threading support!**

- Multi-threading code has been rewritten from scratch and is now robust and ready for use. It is now **enabled by default**.
- Significant performance boosts - both for your frame rates and for your bot’s reactivity.
- This means Infinite map size (via Unbound manager) + Large number of A.I is now finally a very viable option!

![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/0/80d1935593c9ab06e3a29153487f401a767f2d25.gif)  
**Major bugfixes to navigation solver**

- Bots no longer get stuck while lying flush with a wall or obstacle (initial overlap usecase)
- This was an issue reproducible in the sample project and reported by a user. As always, issues reported via the sample project are easiest to reproduce and investigate.
- Improved nav request scheduling (redundant aborts eliminated and more)

**Community Contributions**

Thanks to Vladimir Ivanov for:

- Multiple manager support via actor based manager selection (very common request!)
- Path recalculation support for Flight Location key
- EQS tasks that expose the CanNavgate and RandomNavigableLocation functions and fix for FlyTo node usage with SimpleParallel node.

Thanks to Brune for:

- 4.17 migration code to get me started quickly 🙂
- Blueprint Nativization friendly code changes (n.b. more changes may be needed in this space, either in the nativizer itself or in code)

[hr][/hr]

**Downloads**

- [Don Navigation Plugin 4.17 (v1.8)](https://drive.google.com/open?id=0ByqN_J5XY2wjdzdQdVR1YzRVbDQ)
- [Latest sample project](https://drive.google.com/open?id=0ByqN_J5XY2wjUG5tcXFWanRHWkk)

**Check out my new plugin!**  
A significant amount of effort was needed to get this update out, not just in building the features but in merging _four_ different code bases together and testing some very time-consuming edge cases.

I request that if you found this plugin useful, please also check out my new DoN plugin - [Mesh Painting & Gameplay solution for UE4](https://www.unrealengine.com/marketplace/don-s-mesh-painting-with-paint-blob-collisions), a very feature-rich plugin catering to many different usecases for both FX and gameplay.  
Chances are you may find something you need for your project in there! 😃

See the new plugin’s [Marketplace Link](https://www.unrealengine.com/marketplace/don-s-mesh-painting-with-paint-blob-collisions), [Video Trailer](https://www..com/watch?v=MXrHfWu9vD0) and [Forum thread](https://forums.unrealengine.com/showthread.php?144528-DoN-s-Mesh-Painting-amp-Gameplay-solution) for more.

–

Enjoy this update!

-

---

<div class="post-metadata">

**Author:** ![GameMaster79](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GameMaster79](https://forums.unrealengine.com/u/GameMaster79)\
**Post date:** [September 6, 2017, 3:48pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/271 "2017-09-06T15:48:33Z")

</div>

Hi Venugopalan,

Thank you for making this plug in and giving it away for free. Its very generous support of this community. I’m working with the new version. (1.8) in UE4 4.17. It worked right out of the box in my own project. I did want to report bit of a problem. I have notices some lag hitches when using multi-threading. They went away when I switched to single thread. They happen even when the single unit was not flying. I have an i7-4770K. The hitches were small maybe an extra 10ms. Anyway, just wanted to see if this was known behavior and if there was anything that could be done.

Thanks,

---

<div class="post-metadata">

**Author:** ![VSZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VSZ](https://forums.unrealengine.com/u/VSZ)\
**Post date:** [September 8, 2017, 6:13am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/272 "2017-09-08T06:13:20Z")

</div>

> [@GameMaster79](#):
>
> Hi Venugopalan,
> 
> Thank you for making this plug in and giving it away for free. Its very generous support of this community. I’m working with the new version. (1.8) in UE4 4.17. It worked right out of the box in my own project. I did want to report bit of a problem. I have notices some lag hitches when using multi-threading. They went away when I switched to single thread. They happen even when the single unit was not flying. I have an i7-4770K. The hitches were small maybe an extra 10ms. Anyway, just wanted to see if this was known behavior and if there was anything that could be done.
> 
> Thanks,

Hey, Are you able to reproduce this in the sample project and/or in a packaged game (i.e. w/o the editor)?

---

<div class="post-metadata">

**Author:** ![GameMaster79](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GameMaster79](https://forums.unrealengine.com/u/GameMaster79)\
**Post date:** [September 8, 2017, 9:49pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/273 "2017-09-08T21:49:09Z")

</div>

Yes, you can see it in the demo project although on a smaller scale. If you use Stat Unit Graph on a clean demo project. It hitches from 8.3 ms to about 13 ms. If you unchecked multi-thread the hitching goes away.

---

<div class="post-metadata">

**Author:** ![VSZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VSZ](https://forums.unrealengine.com/u/VSZ)\
**Post date:** [September 11, 2017, 6:26pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/274 "2017-09-11T18:26:03Z")

</div>

> [@GameMaster79](#):
>
> Yes, you can see it in the demo project although on a smaller scale. If you use Stat Unit Graph on a clean demo project. It hitches from 8.3 ms to about 13 ms. If you unchecked multi-thread the hitching goes away.

I wasn’t able to reproduce this issue; tried a variety of different combinations (with visual studio v/s without, editor v/s standalone, idle v/s multiple examples running, etc).

Could you share your profiler dump? (stat startfile + stat stopfile)

---

<div class="post-metadata">

**Author:** ![VSZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VSZ](https://forums.unrealengine.com/u/VSZ)\
**Post date:** [September 19, 2017, 10:48am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/275 "2017-09-19T10:48:05Z")

</div>

For those wondering about the hitch report, I did receive a profiler dump from @\*\*[GameMaster79](https://forums.unrealengine.com/member/190374-gamemaster79) \*\*last week. Just haven’t had the opportunity to check it out yet. If I spot something here I’ll get back!

---

<div class="post-metadata">

**Author:** ![Emrehan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/emrehan/32/1194629_2.png) [@Emrehan](https://forums.unrealengine.com/u/Emrehan)\
**Post date:** [October 31, 2017, 11:25am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/276 "2017-10-31T11:25:39Z")

</div>

Will you share this plugin for 4.18? And thank you for your greatest plugin.

---

<div class="post-metadata">

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

</div>

> [@Emrehan](#):
>
> Will you share this plugin for 4.18? And thank you for your greatest plugin.

Hey, based on my current bandwidth, I will need 3-4 weeks before I get a to look at the 4.18 migration for all my plugins.

Will post an update on [this thread](https://forums.unrealengine.com/unreal-engine/marketplace/113434-don-s-3d-pathfinding-for-flying-a-i-support-thread) when it’s available for this one.

PS: It’s quite possible that the plugin migrates without any issues when compiled too, so do try that if you haven’t already.

---

<div class="post-metadata">

**Author:** ![Araxnid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Araxnid](https://forums.unrealengine.com/u/Araxnid)\
**Post date:** [November 6, 2017, 3:42pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/278 "2017-11-06T15:42:20Z")

</div>

Hey, ! First of all thanks you for such awesome plugin! It saved me a lot of time!  
But, it looks like I’m run into issue with using plugin in c++. It looks like I cant include “DonNavigationManager.h” anywhere, because it’s have “DonNavigationCommon.h” in include list and that include have “AllowWindowsPlatformTypes.h” include, which does’t not allow you to include it more than one time. Am I right or I’m doing something very wrong? I can make a example project.

---

<div class="post-metadata">

**Author:** ![VSZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VSZ](https://forums.unrealengine.com/u/VSZ)\
**Post date:** [November 8, 2017, 8:05am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/279 "2017-11-08T08:05:36Z")

</div>

> [@Araxnid](#):
>
> Hey, ! First of all thanks you for such awesome plugin! It saved me a lot of time!  
> But, it looks like I’m run into issue with using plugin in c++. It looks like I cant include “DonNavigationManager.h” anywhere, because it’s have “DonNavigationCommon.h” in include list and that include have “AllowWindowsPlatformTypes.h” include, which does’t not allow you to include it more than one time. Am I right or I’m doing something very wrong? I can make a example project.

For a live example of how to use the plugin from C++ check out the “Fly To” node class (BTTask\_FlyTo.h/.cpp) which includes the manager via DonNavigationHelper.h and uses the API directly. For your particular issue I suggest methodically comparing your setup with UBTTask\_FlyTo. Make sure you’ve added the plugin’s module (“DonAINavigation”) as a dependency in own your project’s MyProject.build.cs file too. Finally, if you run into any common linkage errors try searching online as well.

---

<div class="post-metadata">

**Author:** ![Kmack](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kmack/32/706181_2.png) [@Kmack](https://forums.unrealengine.com/u/Kmack)\
**Post date:** [November 14, 2017, 6:39am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/280 "2017-11-14T06:39:46Z")

</div>

@ **Emrehan @ FWIW, I’ve verified that DonAINavigation does work without modification in 4.18.**  
The EngineVersion needed to be updated to 4.18.0 in DonAINavigation.uplugin, but it does compile and run without evident issues.  
There’s a Clear Timer by Handle node in the DemoMap event graph that needs to be replaced by a ClearAndInvalidateTimerByHandle node, but those are the only required changes I’ve run across so far.

@ I love this plugin - thank you so much for sharing it with us!

---

<div class="post-metadata">

**Author:** ![FlibleBable](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FlibleBable](https://forums.unrealengine.com/u/FlibleBable)\
**Post date:** [November 25, 2017, 3:50pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/281 "2017-11-25T15:50:04Z")

</div>

Hello and thanks for this plugin. I can’t seem to get the GetRandomPointInNavigableRadius node to work with this plugin. I want to get a random vector location around the AI character. I’ve used this node before in tasks for my behavior tree but I can’t seem to get it to work with this plugin. It just keeps going to the center of the map. Anyone have a suggestion or workaround?

Anyway I appreciate this plugin. It is fun to play with.

---

<div class="post-metadata">

**Author:** ![issam1975](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/issam1975/32/967889_2.png) [@issam1975](https://forums.unrealengine.com/u/issam1975)\
**Post date:** [December 1, 2017, 1:35pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/282 "2017-12-01T13:35:19Z")

</div>

@ is there a way to get a github link or something ? i don’t have the launcher for some good reasons to download the plugin

---

<div class="post-metadata">

**Author:** ![VSZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VSZ](https://forums.unrealengine.com/u/VSZ)\
**Post date:** [December 2, 2017, 7:56pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/283 "2017-12-02T19:56:15Z")

</div>

> [@FlibleBable](#):
>
> Hello and thanks for this plugin. I can’t seem to get the GetRandomPointInNavigableRadius node to work with this plugin. I want to get a random vector location around the AI character. I’ve used this node before in tasks for my behavior tree but I can’t seem to get it to work with this plugin. It just keeps going to the center of the map. Anyone have a suggestion or workaround?

That function only works with Unreal’s native navigation system (whose navmesh cannot be used for 3D pathfinding); the plugin uses its own navigation structures and API.

The plugin does offer the function \*\*FindRandomPointAroundOriginInNavWorld \*\*(on the manager actor)with somewhat similar functionality. In a recent version this was exposed as an EQS query by a community user although I haven’t tested EQS usage myself.

> [@FlibleBable](#):
>
> Anyway I appreciate this plugin. It is fun to play with.

Thank you, glad to hear 🙂

> [@issam1975](#):
>
> @ is there a way to get a github link or something ? i don’t have the launcher for some good reasons to download the plugin

[This post](https://forums.unrealengine.com/unreal-engine/marketplace/113434-don-s-3d-pathfinding-for-flying-a-i-support-thread?p=1392343#post1392343) has a direct download link for the 4.18 version of the plugin.

In any case, here’s the github repo as well: [GitHub - 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 complex pathfinding tasks.](https://github.com/VSZue/DonAINavigation)

> [@Kmack](#):
>
> @ **Emrehan @ FWIW, I’ve verified that DonAINavigation does work without modification in 4.18.**  
> The EngineVersion needed to be updated to 4.18.0 in DonAINavigation.uplugin, but it does compile and run without evident issues.  
> There’s a Clear Timer by Handle node in the DemoMap event graph that needs to be replaced by a ClearAndInvalidateTimerByHandle node, but those are the only required changes I’ve run across so far.

Yes! I’d encourage users to always try migrating the plugin as-is if the official build for a new engine release is not yet available; oftentimes it just works, or will need only minor modifications for API compatibility.

For 4.18, the latest version was released last week ([Link](https://forums.unrealengine.com/unreal-engine/marketplace/113434-don-s-3d-pathfinding-for-flying-a-i-support-thread?p=1392343#post1392343)) and also carries a major bugfix for dynamic obstacles in single-threaded mode (most users should be unaffected fwiw).

> [@Kmack](#):
>
> @ I love this plugin - thank you so much for sharing it with us!

Thanks once again 🙂

---

<div class="post-metadata">

**Author:** ![issam1975](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/issam1975/32/967889_2.png) [@issam1975](https://forums.unrealengine.com/u/issam1975)\
**Post date:** [December 2, 2017, 8:29pm UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/284 "2017-12-02T20:29:03Z")

</div>

@ : thanks a lot, really appreciate \<3  
good luck for your game even if i hate insects 😛

---

<div class="post-metadata">

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

</div>

> [@issam1975](#):
>
> @ : thanks a lot, really appreciate \<3  
> good luck for your game even if i hate insects 😛

Thank you 🙂

Insects are only one aspect of DoN btw! Plant-life/ecology is a big part of the game too.  
Other members of the animal kingdom will eventually make their way into the game, so there will be something in there for one day 😉

---

<div class="post-metadata">

**Author:** ![Vaheva](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vaheva/32/963466_2.png) [@Vaheva](https://forums.unrealengine.com/u/Vaheva)\
**Post date:** [December 7, 2017, 9:10am UTC](https://forums.unrealengine.com/t/dons-3d-pathfinding-flying-ai-system-with-full-source/57271/286 "2017-12-07T09:10:30Z")

</div>

Hello!

Thank’s for this plugin! It was very easy to use, my big problem was with plugin activation, because this is my first one in engine. But after installation I had my drone flying in minutes and I love it.

_ **Question:**  
I have nice and smooth drone rotation in Yaw, but I can’t set up rotating in Pitch. I tried all settings for controller/drone movement etc but it not works. I can code it myself depending on nav points locations and angle, but before I will invent wheel again, maybe is here simplest solution, just I miss something?_

This Yaw problem is gone. I started it from new in other project and now drone rotating in any angle, no problem.

How to destroy path after actor destroy? I have respawn system and I see, path still exists and new drone can’t fly.

Thank’s again, great job!

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

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