@VSZ This is amazing! Seriously impressed with performance and functionality!
Likely a stupid question, but I’ve turned off all of the debug options in the behavior tree and I’m still seeing the path-finding debug lines. Is there somewhere else that these need to be disabled?
Where does this Array get set, and What exactly does this Is Valid node do?
This is a great project. Thank you for sharing this.
There is enough here that I can get this to do what I need,
but I really would like to understand the way the design pattern set up.
It is handles collision and object selection in a way I haven’t used before.
There are a few layers of abstraction and I can’t figure out how the Triggers are activating the right bots.
I can’t find where this array of objects has it’s values set.
I looked in the construction scripts and Level BluePrint andd in the DonNavigationManager.h, or DonNavigationCommon.h
I can’t figure out how that array got populated.
The array is Called “Tiggered Actors List” and it is a member of BP_DemoTrigger
Also I don’t really understand how the “Is Valid” node ends up selecting the right navigator pawn to move around.
I see that it does, but I would like to know why an Is Valid node was used instead of testing for a string that matches or another way to determine which object was bumped into.
That variable feeds directly into Unreal’s Query Params for collision (FCollisionQueryParams) and that only supports ignoring actor and component instances rather than classes afaict.
The Unreal workflow is to setup suitable collision presets in your project settings (with new object types if necessary) and then assign those presets to your primitive components (or even mesh assets with the new default collision preset feature) as needed.
Hey, those trigger actors are from Epic’s Content Examples project.
To answer your question: The array is populated in the level, you need to click on a trigger actor in the world outliner and look at the array in the details panel to see which actors it is capable of influencing (via the Call Trigger Actor interface, which any such actors must implement). IsValid is not used for selection. It is just a normal validity check, no magic under the hood.
Suggest checking out Epic’s Content Examples project if you need more information.
The Fly To node in the behavior tree is the only entity capable of generating debug lines (apart from any custom debugging nodes you may have copied over into the level blueprint).
Does your BT have multiple Fly To nodes? Perhaps one of them still has its debug flags turned on.
Thank you for your prompt response.
I forgot to look in the detail panel on the actual map.
I was thinking the array was global and populated in code somewhere and then
the for each loop looked at all of the BP_NavigatorPawns and then
The isValid node somehow selected the right Pawn.
And I really wanted to know how that was even possible.
But now it is all clear. I understand what you did.
The array is set by the level designer in the editor and
The way you set it up anyone can change it in the editor.
Thanks again for sharing this project. It is really great work.
love this! i have a problem with the 4.15 when i place a Don Navigation Manager in the level and build for windows 64 the game crash at begin ,
when i delete don nav from the level and build again it work perfectly, there are some fixes for that? thank you !
An update was released earlier this week with several bugfixes!
Change log:-
Crash fix for “Infinite Manger” navigation mode.
Added #ifdef statements around certain platform specific includes for portability.
Downgraded certain error logs to warnings: Now you will no longer receive errors in the logs when your bot’s pathfinding origin or destination was adjusted with an offset (this is done to make pathfinding viable in tricky spots). Previously this used to log an error but now it will simply show as a warning.
Hope this patch improves your experience of the plugin further
Do you, by chance, have a write-up that I can follow along with starting from a C++ project? I am anxious to try this amazing looking tool
I’ve reviewed some of the GitHub source, but haven’t stumbled on the documentation mentioned in the QSG. I certainly can, and will, lumber through the code and figure out how the setup and initialization should be (if needed), but if you have a simple write up that would be helpful to me.
There’s no write-up for C++ that you can readily use right now (although the API is fully documented in the header).
The Fly To node’s C++ implementation (BTTask_FlyTo.cpp) offers a fair overview of the different ways you can access the plugin’s C++ API. Search for SchedulePathfindingTask which is the main entry point and see how the result delegates are bound. All the C++ API functions are fully documented in the header (eg: For SchedulePathfindingTask see DonNavigationManager.h) that should help you get started with the API.
If you’re using BTTask_FlyTo.cpp as a reference you can totally ignore the CustomDelegatePayload conversions in the FlyTo impl which are just a way of overcoming idiosyncrasies in the impl of behavior tree tasks (those quirks are documented extensively inside the FlyTo code itself).
Another approach is to open the sample project’s BP_Navigator_Dummy blueprint which provides a good high-level overview of the API (see “DoN Navigation - direct API queries” comment box) which you can then translate into C++ by using right-click Go to Definition to see the corresponding C++ function for each node. Unlike the FlyTo node, this Blueprint contains only exactly what is necessary and may be easier to learn from.
I just want to say that I’ve been massively impressed with this. Due to a little boolean error in my blueprint, I accidentally spawned a huge swarm of flying NPCs. I looked at the cloud of them and said, “Oh yeah, this is going to crash awesomely.” Nope! They all came right at me and it looked amazing.
Also, if anyone is wondering, this works perfectly with Voxelfarm (or any procedural mesh component based terrain). Pretty much out of the box, flying AI will navigate tunnels you dig or pre-determined caves with the cave module they recently integrated.
Hey, @VSZ! I think I found another bug w/ an easy fix. Seems like this call to IsDirectPathLineSweep in SchedulePathfindingTask should be passing the collision inflation value in QueryParams, yeah?
// Do we have direct access to the goal?
FHitResult hitResult;
const bool bFindInitialOverlaps = true;
if (IsDirectPathLineSweep(CollisionComponent, Origin, Destination, hitResult, bFindInitialOverlaps))
{
....
Recently implemented support for units flying in formation and the leader needs some inflation to ensure there’s room for his buddies!