DoN's 3D Pathfinding for Flying A.I. [Support Thread]

I was trying to find the custom event customAddMovementInput like the one below for a day or two, but was having no luck. I can find the customAddMovementInput (message) and (interface), but not the (event). I see that the target of this custom event is DonNavigator, but neither did I find the object with the class DonNavigator, nor the class DonNavigator. I am using the bp plugin from Unreal MarketPlace. Am I missing something?

The above problem was solved by creating an interface.

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?

So, the plugin suddenly started making problems. Haven’t changed anything about the nav, as I’ve been dealing with level design recently. And yet – what used to work, now crashes the engine. [SPOILER]



  Access violation - code c0000005 (first/second chance not available)
   
  UE4Editor_DonAINavigation!TSet<AActor *,DefaultKeyFuncs<AActor *,0>,FDefaultSetAllocator>::FindId() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\core\public\containers\set.h:631]
  UE4Editor_DonAINavigation!UBTTask_FlyTo::SchedulePathfindingRequest() [g:\engines\unreal\source\ue_4_20\engine\plugins\marketplace\donainavigation\source\donainavigation\private\behaviortree\bttask_flyto.cpp:92]
  UE4Editor_DonAINavigation!UBTTask_FlyTo::ExecuteTask() [g:\engines\unreal\source\ue_4_20\engine\plugins\marketplace\donainavigation\source\donainavigation\private\behaviortree\bttask_flyto.cpp:58]
  UE4Editor_AIModule!UBehaviorTreeComponent::ExecuteTask() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\aimodule\private\behaviortree\behaviortreecomponent.cpp:1687]
  UE4Editor_AIModule!UBehaviorTreeComponent::ProcessExecutionRequest() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\aimodule\private\behaviortree\behaviortreecomponent.cpp:1448]
  UE4Editor_AIModule!UBehaviorTreeComponent::TickComponent() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\aimodule\private\behaviortree\behaviortreecomponent.cpp:1172]
  UE4Editor_Engine!FActorComponentTickFunction::ExecuteTickHelper<<lambda_e8384def656dc646af48282ce274db64> >() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\engine\classes\gameframework\actor.h:3095]
  UE4Editor_Engine!FActorComponentTickFunction::ExecuteTick() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\engine\private\components\actorcomponent.cpp:797]
  UE4Editor_Engine!TGraphTask<FTickFunctionTask>::ExecuteTask() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\core\public\async	askgraphinterfaces.h:829]
  UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\core\private\async	askgraph.cpp:665]
  UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilIdle() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\core\private\async	askgraph.cpp:585]
  UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\engine\private	icktaskmanager.cpp:558]
  UE4Editor_Engine!FTickTaskManager::RunTickGroup() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\engine\private	icktaskmanager.cpp:1455]
  UE4Editor_Engine!UWorld::RunTickGroup() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\engine\private\leveltick.cpp:780]
  UE4Editor_Engine!UWorld::Tick() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\engine\private\leveltick.cpp:1466]
  UE4Editor_UnrealEd!UEditorEngine::Tick() [g:\engines\unreal\source\ue_4_20\engine\source\editor\unrealed\private\editorengine.cpp:1691]
  UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [g:\engines\unreal\source\ue_4_20\engine\source\editor\unrealed\private\unrealedengine.cpp:403]
  UE4Editor!FEngineLoop::Tick() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\launch\private\launchengineloop.cpp:3495]
  UE4Editor!GuardedMain() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\launch\private\launch.cpp:166]
  UE4Editor!GuardedMainWrapper() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\launch\private\windows\launchwindows.cpp:144]
  UE4Editor!WinMain() [g:\engines\unreal\source\ue_4_20\engine\source\runtime\launch\private\windows\launchwindows.cpp:223]
  UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
  kernel32
  ntdll

[/SPOILER]
I’ve dealt with access violation once before, it was due to the pawn being out of the nav volume bounds. It is not the case this time, I made double-sure of that.

UE 4.20.2, Blueprint project
Relevant screenshots: DoN's 3D Pathfinding woes - Album on Imgur

I also posted it as issue on Github repo and included stack trace there. If any more testing or logs are needed, just tell me what I need to do.

Editor crash once an AI is starting the “Fly To” BT node

Does DoNNavigation take into account the world origin offset? I have a game I’m working on where we move the world origin pretty regularly, and when that happens, the pathfinding doesn’t seem to be offset by the world origin shift. Has anyone encountered this? If so, what was the workaround?

Hi @VSZ ,
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 chance not available) There is something i can do for fix it? Thanks

Thank you so much for sharing this with everyone :slight_smile:

Does anybody have a copy of the 4.18 plugin? It seems to have been taken off of the marketplace, and this is the version Im working on

Prior versions were removed as they wanted me to resubmit older versions with some changes and I didn’t have much time for that. Upon your request I’ve uploaded the 4.18 plugin here though.

Some quick thoughts on a related topic:

~ Plugin Dev Status / Forum Absence / Emails / etc ~
I’ve been absent from this thread for a while and also haven’t replied to a large number of emails on this plugin for a while so wanted to quickly address that:

It’s been very busy times for me managing my game Drunk On Nectar on Steam. As a single developer of a game with an unusually broad scope (this plugin is just one of literally hundreds of such systems in the game :)), there is very little bandwidth for correspondence related to this free plugin. The volume of support requests (primarily email) has also grown enormously over time. As the source code is publicly available along with a large body of past forum replies (including this older thread), my hope is that users have some viable starting point for investigating issues or concerns on their own.

It’s also going to be 3 years since the plugin was released come next year and obviously at some point I’ll need to move on :slight_smile:

I will continue updating new engine versions on the marketplace though I will most likely not be able to answer correspondence on the forums or on email. My apologies for that.

~

The plugin is currently being to use to enact the Mating & Reproduction of some lovely Monarch Butterflies, so I must get back to that now :slight_smile:

Here’s what I’ve been busy with!

See more here!
https://store.steampowered.com/app/5…ure_Simulator/
❀ [HR][/HR]

Awesome plugin. Thank you for sharing it!

One question, how can we know if a Schedule Pathfinding Task has failed/been aborted?

Awesome plugin! I think you should apply for the Unreal dev grant

You can implement custom task that calls ShedulePathfindingTask from DonNavigator instance or use those FlyTo flip flop keys in BT.
Problem is that as far as I’ve experimented none of these seem to notify when target location is invalid. Instead there’s massive cpu spike and then error in log, would love to know how to prevent this and get task fail instead.

That’s why I asked if there is a way to know it o.O

Yeah but it seems that when target location is inside collision it’s different “state” than when path simply doesn’t exist :stuck_out_tongue:

I cannot get this to work I have two goals the same flying actor the navigation manager in my project and everything the helicopter just stays put.

Hi DoN,
Thank you for making this plug in! I just started using it for some drones and eventually more, but as UE4.22 just released, I’m unable to develop further. Do you have plans to support UE4.22? Thanks!

How exactly do you add the add movement on input event to your ai? Is it just a custom event? If so, how do I set the “Fly to” node to call my custom event. I have my behavior tree set up, but without the event behind the movement I cant take it any further. Any help would be appreciated. Thanks!

Thanks, I had to look into blueprint interfaces, and add the actual “Don Navigator” interface to my blueprint under “Class Settings”. I am now further along, and my flying ai will turn towards its path, but refuse to go anywhere. I believe it’s colliding with itself somehow, because it shows a red box around it but everything looks similar to the sample project. It is in open space away from any other objects/trigger volumes. Hopefully I can find the solution to this as well, but any ideas would be appreciated. Thanks again!

Have you ever gotten that to work I have the exact same error

Hey @JanStapler and @Angius ,

I tried this awesome Plugin today. I had the exact same errors as soon as I put in my own level and couldn’t figure it out. I then opened the sample project and migrated his bot over to my project, changed a few things to satisfy a goal, and it still wouldn’t work. I then thought my level was too large, so I made a default level from file new level, with a little floor. I put DonManager into the scene, and sized it using the X, Y, and Z properties in the Manger, NOT the transform (scale). The bot went right up to a goal with no issue.

I then went back into my other level, deleted DonManager, placed a new one back in, sized it using the X, Y, and Z properties of the DonManager and not the transform (scale). This worked. I now have flying AI without issue. Since my error is the same as yours, I’ll bet you also used the transform scale tool to enlarge the area. This is where I went wrong.

I did not do what the author suggested in his instructional video, which IS to use the X, Y, and Z grid size properties within the DonManager to edit the size of the volume.

edit: I also got an error (same error) when the AI went out of the bounds of the DonManager.

Please let me know how that works out for you.

-Erol

Hi @crumbaker ,

Yes, The video by the author provides the essential information you need to use this wonderful product. There are a few things to keep in mind:

Pay attention to the video closely for what he says to do and not to do
Ensure you use the XYZ GridSize properties within the DonManager to expand the volume, NOT the UE transform tool (or direct editing) to increase/decrease the scale of the bounds of the DonManager.
Ensure your AI never go outside the bounds, or crash (at least for me on 4.22.2).
*** This one took me a while to figure out, but it was his tools that allowed me to figure it out, despite him saying it in the video (which is easily overlooked). If you have some goal inside some object, say for example, a box collision that you use to generate a point of reference inside its bounds (maybe random, or just the origin point of the box volume), or the goal is the location of some actor: Ensure you are aware that the DonManager uses an array of entries to exclude from pathing, specifically, by default, WorldStatic and WorldDynamic. In my case, I have a box volume around a track that I generate random points for an AI to fly through. These actors were set to WorldStatic. When the AI would fly from point to point, it would appear as if it would collide with the box or have some trouble going to the point within the bounds. The Author provides a set of tools. One of them allows you to call SchedulePathFindingTask, which has the option of showing you points. I found that the points would go up and over the bounding box. Then I looked at the checkpoint and sure enough, WorldStatic. I changed it to a new type. This tool is freaking awesome and it works REALLY fast!

Thank you @VSZ for this wonderful gift!!