# 's Multi-Threaded Dynamic Pathing System, Full Physics Support

**URL:** <https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [July 30, 2014, 8:52pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510 "2014-07-30T20:52:04Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![anonymous\_user\_0df12f74](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0df12f74](https://forums.unrealengine.com/u/anonymous_user_0df12f74)\
**Post date:** [August 2, 2014, 7:16pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/21 "2014-08-02T19:16:49Z")

</div>

Haha that video is so awesome! The dwarf army of the sky, with dynamic pathing abilities… who can stop them?!? 😉 (although they seem to be overly fond of that purple stuff… maybe that’s their weakness!)

Great work! All of your projects look like so much fun!

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [August 2, 2014, 8:27pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/22 "2014-08-02T20:27:33Z")

</div>

> [@;110023](#):
>
> So much fun to watch those dwarves find their path. 😃 Really impressive! And now i wonder how it would look to have a herd of sheep like that and turn it into a sheep herding simulation. 😛
> 
> Btw, would be applicable for flying AI as well?

Glad you like it ! Great to hear from you!

If you supply the sheep skeletal mesh and anims I can get going for you 🙂

The flying AI system I made was trace based, but yes I could rework it to take advantage of the dynamic navigation system 🙂

> [@Ixiguis;110022](#):
>
> Great work!
> 
> Do the dwarves navigate around each other as well?

That will be the next step! Characters are not calculated in my dynamic mesh that I generate, as they should not be considered as impassible obstacles, instead one of two things

1. if stuck by a friendly, push them out of the way / request that they move

2. if stuck by a opponent, attack them!

3. if stuck by a sheep as per 's simulator, feed the sheep so they becomes satisfied and move out of the way

all of beyond the scope of my static/dyanimc/physics geometry detection system 🙂

> [@;110025](#):
>
> Haha that video is so awesome! The dwarf army of the sky, with dynamic pathing abilities… who can stop them?!? 😉 (although they seem to be overly fond of that purple stuff… maybe that’s their weakness!)
> 
> Great work! All of your projects look like so much fun!

The purple stuff affects dwarven brains in a very particular way, leading to moments of sudden clarity, happiness, and inspiration, sort of like Catnip

PS: Glad you liked the video!

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [August 3, 2014, 12:16am UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/23 "2014-08-03T00:16:50Z")

</div>

> [@;110064](#):
>
> If you supply the sheep skeletal mesh and anims I can get going for you 🙂

You asked for it! No sheep but here i prepared a trippy Epic cow with an idle and walking animations.

> **[CowforRama.rar](https://www.dropbox.com/s/lq5n6ghfef95fui/CowforRama.rar)**
>
> Shared with Dropbox

I cant wait to see what you come up with it! :eek:

Btw, it’s great to hear that can be adaptable to flying AI!

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [August 3, 2014, 12:50am UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/24 "2014-08-03T00:50:01Z")

</div>

> [@;110138](#):
>
> You asked for it! No sheep but here i prepared a trippy Epic cow with an idle and walking animations.
> 
> [Dropbox - CowforRama.rar - Simplify your life](https://www.dropbox.com/s/lq5n6ghfef95fui/CowforRama.rar)
> 
> I cant wait to see what you come up with it! :eek:
> 
> Btw, it’s great to hear that can be adaptable to flying AI!

Wohoo!

Thank youuu !

🙂

🙂

🙂

Wow did you make those animations yourself?! The idle is really really good!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0df12f74](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0df12f74](https://forums.unrealengine.com/u/anonymous_user_0df12f74)\
**Post date:** [August 3, 2014, 1:10am UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/25 "2014-08-03T01:10:37Z")

</div>

> [@;110138](#):
>
> You asked for it! No sheep but here i prepared a trippy Epic cow with an idle and walking animations.  
> I cant wait to see what you come up with it! :eek:

Yes!! I want to see one (or both?) of 2 things: a cow vs dwarf fight, each dwarf/cow dynamically finding a path to a dwarf/cow that has no fighting partner, so dynamic pathing with the ability to randomly chose which cow should fight which dwarf. Then whichever cow or dwarf is victorius, as a reward, send them to the reward zone so they can soak up that magical purple haze… haha! That would be so great 😃

I guess I could also deal with a single dwarf cow-herder telling the cows where to go using dynamic pathing (in other words, make the dwarf actually herd the cows into the pasture), have the dwarf call a command and have the cows calculate a new path towards their grazing field from their current location (make sure you fence it off to keep them cows in line!), and if herded successfully, the dwarf get’s his purple haze stuff and all is good. 🙂

Oh, Jackie mentioned flying AI??? how about a Flying cows Simulator? Just find some angel wings, glue them on the back of the cow, and the dwarves will never know what hit them! 🆒

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [August 3, 2014, 1:11am UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/26 "2014-08-03T01:11:19Z")

</div>

> [@;110157](#):
>
> Wow did you make those animations yourself?! The idle is really really good!

Oh yeah. Finally seeing the benefit of all the time i spent with cows and sheep. :o Seriously though, cow made me want to animate a proper animal, so i’ll let you know if i find and animate more herbivores!(imagine a herd of mustangs running across the landscape :eek: )

Btw, is free to use that cow for whatever reason you wish. Consider it a reward for keeping yourselves up to date with 's crazy stuff. 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0df12f74](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0df12f74](https://forums.unrealengine.com/u/anonymous_user_0df12f74)\
**Post date:** [August 3, 2014, 1:37am UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/27 "2014-08-03T01:37:05Z")

</div>

> [@;110164](#):
>
> Btw, is free to use that cow for whatever reason you wish. Consider it a reward for keeping yourselves up to date with 's crazy stuff. 🙂

Hey that’s awesome! Thank you , I don’t have any 4 legged beasts yet, so will be a lot of fun to play around with! 😃 Thanks!

---

<div class="post-metadata">

**Author:** ![alfalfasprossen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alfalfasprossen](https://forums.unrealengine.com/u/alfalfasprossen)\
**Post date:** [August 3, 2014, 10:58am UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/28 "2014-08-03T10:58:13Z")

</div>

awesome stuff. So it works with elevation? A heightmap terrain or some area that has steep slopes? You gotta prevent that dwarves from falling to their death, right? 😃

> [@](#):
>
> For instance, could you tell a dwarf to jump across a gap if it was small enough?

+1 that would be very nice to have

---

<div class="post-metadata">

**Author:** ![Xodroc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xodroc](https://forums.unrealengine.com/u/Xodroc)\
**Post date:** [August 3, 2014, 11:18am UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/29 "2014-08-03T11:18:34Z")

</div>

Phenomenal Work as usual !

Something I’ve had in mind for a long time is having normal sized characters that have to navigate around physics obstacles while having a giant sized character that just pushes things out of the way in pursuit. I could go nuts with ideas, though don’t want to flood you.

If you’re thinking of selling on the market place, I’d probably buy it if it’s in my range 😉

Out of curiosity, what are the specs of the system you’re running the tests on?

---

<div class="post-metadata">

**Author:** ![Xodroc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xodroc](https://forums.unrealengine.com/u/Xodroc)\
**Post date:** [August 3, 2014, 11:20am UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/30 "2014-08-03T11:20:14Z")

</div>

> [@alfalfasprossen;110395](#):
>
> You gotta prevent that dwarves from falling to their death, right? 😃

Unless they have the intelligence of Lemmings 😛

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [August 3, 2014, 3:28pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/31 "2014-08-03T15:28:58Z")

</div>

> [@JBaldwin;110225](#):
>
> Quick question :: Does work only on a solid surface? For instance, could you tell a dwarf to jump across a gap if it was small enough? Can the dynamic path system you created do transitions like ?
> 
> Can’t wait to see more bud 🙂

Funny you should ask !

I already made a gap detection/jump ability for my AI system in my Victory Game!

I had skeletons following me and jumping over gaps that I as the player had to jump over too!

So yea I could get that going real quick, already have the code for it!

🙂

> [@alfalfasprossen;110395](#):
>
> awesome stuff. So it works with elevation? A heightmap terrain or some area that has steep slopes? You gotta prevent that dwarves from falling to their death, right? 😃

The game I’m working on doesnt have falling damage, but yes I could teach my AI to do anything I want them to do, except maybe juggling. I can’t teach them how to do something I"ve not figured out yet myself 🙂 hee hee!

> [@;110164](#):
>
> Oh yeah. Finally seeing the benefit of all the time i spent with cows and sheep. :o Seriously though, cow made me want to animate a proper animal, so i’ll let you know if i find and animate more herbivores!(imagine a herd of mustangs running across the landscape :eek: )

Wow, well that Cow idle anim was especially amazing!

It really looks like a living creature now thanks to you!

So yea! I am all for seeing more of your animated animal handiwork!

🙂

> [@Xodroc;110404](#):
>
> If you’re thinking of selling on the market place, I’d probably buy it if it’s in my range 😉
> 
> Out of curiosity, what are the specs of the system you’re running the tests on?

Intel Core i7, GTX 680, and um, I am not sure about the rest but it works 🙂

> [@;110163](#):
>
> I guess I could also deal with a single dwarf cow-herder telling the cows where to go using dynamic pathing (in other words, make the dwarf actually herd the cows into the pasture), have the dwarf call a command and have the cows calculate a new path towards their grazing field from their current location (make sure you fence it off to keep them cows in line!), and if herded successfully, the dwarf get’s his purple haze stuff and all is good. 🙂

oooh now there’s an interesting idea! I will be doing unit control soon so even YOU could be the cow-herder (optional reward of purple haze even 4 u)!

🙂

---

<div class="post-metadata">

**Author:** ![Xodroc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xodroc](https://forums.unrealengine.com/u/Xodroc)\
**Post date:** [August 4, 2014, 10:27pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/32 "2014-08-04T22:27:14Z")

</div>

How does it perform on vast distances? Is it cheaper than Left 4 Dead style AI movement? (Guessing it probably is)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_adcf0aef](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_adcf0aef](https://forums.unrealengine.com/u/anonymous_user_adcf0aef)\
**Post date:** [August 5, 2014, 12:12am UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/33 "2014-08-05T00:12:58Z")

</div>

As of right now, does support behavior trees? It would be cool if when you released it (if you do :D), it came with a bunch of tasks the creator can use in behavior trees. 🙂

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [August 5, 2014, 5:00pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/34 "2014-08-05T17:00:44Z")

</div>

> [@Xodroc;111181](#):
>
> How does it perform on vast distances? Is it cheaper than Left 4 Dead style AI movement? (Guessing it probably is)

Actually the larger the distance the better, as I combine open areas into very very large nodes 🙂 Actually serves to reduce the over all node count. Level streaming should automatically work since new pathing volumes that get streamed in will be detected by the primary pathing engine I created, and added to the calculations.

I never assume how many pathing volumes there are and do updates quite frequently. 🙂

> [@;111236](#):
>
> As of right now, does support behavior trees? It would be cool if when you released it (if you do :D), it came with a bunch of tasks the creator can use in behavior trees. 🙂

I already wrote my own AI editor that gives people per-unit AI control.

Not per class, per instance of that class!

Meaning, you could have two warriors with completely unique AIs

My AI supports individual-unit personality 🙂

And the AI Editor I developed is point and click to use!

I’ve never released a video on system,but am remaking it using my Victory HUD Elements UI Solution for new paid project I am working on.

So I will have more info and videos when I get that all done!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_adcf0aef](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_adcf0aef](https://forums.unrealengine.com/u/anonymous_user_adcf0aef)\
**Post date:** [August 5, 2014, 11:09pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/35 "2014-08-05T23:09:35Z")

</div>

Awesome! Sorry for all the questions, but does it also work with instanced foliage as well? I have a huge forest (made of SpeedTrees) and I really do not want to generate a Navigation Mesh each time I add something… lol it takes forever. Thank you! I really appreciate it! 🙂

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [August 6, 2014, 9:30pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/36 "2014-08-06T21:30:52Z")

</div>

> [@;112082](#):
>
> Awesome! Sorry for all the questions, but does it also work with instanced foliage as well? I have a huge forest (made of SpeedTrees) and I really do not want to generate a Navigation Mesh each time I add something… lol it takes forever. Thank you! I really appreciate it! 🙂

My system detects overlaps in addition to blocking collisions, so if those foliage instances have any kind of overlap collision (not necessarily blocking) then yes my navigation system will be constantly updating around those foliage actors 🙂

My system can be made to permanently exclude any actors from collision tests that someone wants to exclude, using just BP.

---

<div class="post-metadata">

**Author:** ![KRushin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KRushin](https://forums.unrealengine.com/u/KRushin)\
**Post date:** [August 7, 2014, 9:26pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/37 "2014-08-07T21:26:03Z")

</div>

Congrats glad to see some community members pitch in!

I’ve seen various tools, plugins,integrations, WIPs, prototypes. I’m interested to see what the Victory game entails! haha

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [August 8, 2014, 10:30pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/38 "2014-08-08T22:30:44Z")

</div>

> [@;113350](#):
>
> Congrats glad to see some community members pitch in!
> 
> I’ve seen various tools, plugins,integrations, WIPs, prototypes. I’m interested to see what the Victory game entails! haha

Hee hee!

I just last night got it so my AI units will all path to and surround a building that is their chosen target, covering all surface area of the building that is on their ground level 🙂

More videos soon!

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [August 12, 2014, 1:05pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/39 "2014-08-12T13:05:35Z")

</div>

**[FONT=Comic Sans MS] AI Blows Stuff Up**

[https://youtube.com/gjCDA\_FiVxk](https://youtube.com/gjCDA_FiVxk)

Everything you see in the video is completely dynamically calculated by me in the C++!

Nothing is pre-scripted!

I do not even tell the AI units what to target when they are spawned!

Everything you see is my own AI system at work

1. all the pathing is my own pathing system, from scratch

2. I set up an Alignment system so the AI units know who is friendly and which structures to attack

3. The AI is told by me to spread out, and keep track of which structures other friendly units are attacking.

maximizes their usefulness to each other, as they cover maximum building surface area!

Meaning, if a new AI unit is trying to pick a target, my AI will try to pick a target that no other friendly in the area is attacking yet.

1. Each AI unit is keeping track of all nearby friendly units during runtime, dynamically updating its personal list of friendlies every few moments.

means each AI unit is aware of all friendlies at all times, as well as all nearby structures

1. When a structure is destroyed, each AI unit tries to find a new target

2. Apex destructibles block the AI pathing, so they try to get around using my dynamic physics pathing system.

3. Each AI unit is consciously deciding how far to position itself away from the target building for ideal melee range.

4. Each AI unit is deciding when it is close enough to the surface area of its target structure and then stops moving and begins attacking.

5. As I said, nothing is pre-arranged, as you saw I ran multiple tests! The AI is spreading and and performing to all my specifications listed above!

6. Yay! Victory!!!

🙂

PS: the sparks are created at the precise point in the animation sequence that I specify, using an anim notify.

anim notify then calls my C++ AI function for doing damage.

So the visual appearance of doing damage is indeed triggering my C++ AI system !

The visual appearance and the C++ are linked together completely!

---

<div class="post-metadata">

**Author:** ![Devero](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Devero](https://forums.unrealengine.com/u/Devero)\
**Post date:** [August 12, 2014, 1:33pm UTC](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510/40 "2014-08-12T13:33:52Z")

</div>

Awesome video, great work! Lots of destruction. 😃

[Previous page](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510.md?page=1)

[Next page](https://forums.unrealengine.com/t/s-multi-threaded-dynamic-pathing-system-full-physics-support/8510.md?page=3)
