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

How to hide the path lines

How to hide the path lines
![722GZG4]H$7Q0D)A$3Q7NK.png|638x254

Very good, I have put the plug in my project, very good, but I have a problem, the project is always packed failed, but I can not find what reason, I use the 4.12 version of the engine ,Thank you.

@Giraya @woshihong - Totally missed your posts, sorry. I rely on the forum email notification system to check this thread and sometimes it just doesn’t send a mail when a new post arrives.

–
@Giraya - The compiler on Linux/Mac is stricter than Windows. You’ll need to open DonAINavigation.Build.cs and add bEnableShadowVariableWarnings = false; inside the DonAINavigation module constructor to fix build errors. I’ve tested the plugin on Linux before and it worked after making this change.

–
@woshihong - Open the behavior tree named “FlightBehavior”, click on the node “Fly To” and under “Query Params” turn off the options to Visualize Raw/Optimzied path.

–
@wuyukang - I found no issues packaging the 4.12 project when I tried it now and no one else has reported it either so we’ll need to see your packaging Output Logs/Cook logs to know what’s going on. The output log will tell you where the Cook log is located as well.

Most likely a setup issue on your end. Common packaging issues include:
#1 Folder path being too long (just try packaging to a top-level folder like D: est for example)
#2 Project name starting with a number as opposed to a letter. Eg: A project named 3DNavTest will not package while Nav3DTest will.
#3 Lack of disk space, etc…

@

Hi,
I’m trying to build your plugin on Mac and its giving me this error:
“Plugins/DonAINavigation 2/Source/DonAINavigation/Classes/DonNavigationManager.h:295:20: error: assigning field to itself -Werror,-Wself-assign-field]”

@
Please look at my log files it
https://www.dropbox.com/s/q7fwhou0euqakhk/Log.txt?dl=0

Did you edit Build.cs by setting bEnableShadowVariableWarnings = false; like I explained above? That error only comes when you haven’t fixed that setting.

The error appears to be this line:


UE4Editor-Cmd: Ensure condition failed: ObservedKeyNames.Num() > 0 [File:D:\Build\++UE4+Release-4.12+Compile\Sync\Engine\Source\Runtime\AIModule\Private\BehaviorTree\Decorators\BTDecorator_BlueprintBase.cpp] [Line: 66]

I found an Answerhub post with a similar issue but no one else has reported this issue with the 4.12 build and I’m not seeing it either.

What is the name of the zip file from which you loaded the sample project?

@
Yes, i add bEnableShadowVariableWarnings = false; in the DonAINavigation.Build.cs constructor and still giving me this error

Ok, that worked on Linux, I don’t have a Mac so I’ve never tested there.

Edit:
So the error is coming from an initializer list in DonNavigationManager.h:295:20.

Looks like the Mac compiler doesn’t like the underscore I’m using to differentiate the local variable and member (_DrawDebugVolumes v/s DrawDebugVolumes). If the bEnableShadowVariableWarnings flag is not working on Mac then the only option is to manually make all initializer list variable names unique.

For example, you’ll have to change the initializer list code from this:



FDoNNavigationDebugParams(bool _DrawDebugVolumes, bool _VisualizeRawPath, bool _VisualizeOptimizedPath, bool _VisualizeInRealTime, float _LineThickness)
	{
		DrawDebugVolumes = _DrawDebugVolumes;
		VisualizeRawPath = _VisualizeRawPath;
		VisualizeOptimizedPath = _VisualizeOptimizedPath;
		VisualizeInRealTime = _VisualizeInRealTime;
		LineThickness = _LineThickness;
	}


to something like



FDoNNavigationDebugParams(bool local_DrawDebugVolumes, bool local_VisualizeRawPath, bool local_VisualizeOptimizedPath, bool local_VisualizeInRealTime, float local_LineThickness)
	{
		DrawDebugVolumes = local_DrawDebugVolumes;
		VisualizeRawPath = local_VisualizeRawPath;
		VisualizeOptimizedPath =local _VisualizeOptimizedPath;
		VisualizeInRealTime = local_VisualizeInRealTime;
		LineThickness = local_LineThickness;
	}


You will need to make similar changes in all initializer lists in that file and any other places where this issue comes up. Again, I haven’t tested the plugin on Mac ever so you might run into more compilation issues along these lines.

@
Thanks for the help, I manage to build it making some changes

In DonNavigationManager.h:295 there was a self assigning


DrawDebugVolumes = DrawDebugVolumes;

I just add a ‘_’ in the second one and worked

@YagoTxr - Great to hear :slight_smile: That’s fixed in a local build of mine, one of the many changes I just haven’t had time to push out yet along with some of the recently discovered items mentioned in this post.

@

Hi,
I delete the ‘CloseEnough’ blueprint, and create a new one that is totally the same with the old one, now packing a success! Thank you:)

Great! :slight_smile: Thanks for posting the solution. Looks like that blueprint got corrupted during download or unpacking. I’ve had something similar happen to me once.

4.13 or bust :wink:

I am sure that there will be a port for 4.13 soon :wink:

I hope so. I upgraded to 4.13 and now I can’t open my project. Hope there’s something soon!

My game’s release is around the corner so that’s been keeping me very busy.

I don’t have 4.13 installed either and will need to make free space for it first (believe me that’s so much harder than it sounds and a mental diversion I’d rather not tackle now!).

I’ll try to take a look at it this week but I can’t commit to it though.

I understand, dude. Don’t fret too hard.

@Cinebeast - I found no compilation issues when I built the plugin for 4.13 today.

Some other plugin or code that you’re using might be preventing you from opening your project.

In any case, I’ll upload the plugin for 4.13 sometime this week but that’s probably not going to help you open your project till you fix the other plugins or C++ code that your project uses!

@

Thank you! In the meantime, I’ve found a fix by opening a version of the project in 4.12. (Close call there. I forgot I had it.)

With that said, I don’t think the issue’s necessarily on my end . I tried to make a new 4.13 project with your plugin and met an error message. Without your plugin, I can make a new 4.13 project just fine. And I can make 4.12 projects with or without your plugin. So, I dunno.

Still, things look fixed for now.

Hey, thanks for the plugin. It’s so good for a free product and we have been using it for a couple of engine versions now.

I was just trying to recompile for 4.13 and it gave me a list of errors.



2>  DonAINavigation.generated.cpp
2>U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Classes\DonNavigationManager.h(519): warning C4458: declaration of 'Mesh' hides class member
2>  U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Classes\DonNavigationManager.h(487): note: see declaration of 'FDonMeshIdentifier::Mesh'
2>U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Classes/DonNavigationManager.h(519): warning C4458: declaration of 'Mesh' hides class member
2>  U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Classes/DonNavigationManager.h(487): note: see declaration of 'FDonMeshIdentifier::Mesh'
2>U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Private\DonNavigationManager.cpp(47): warning C4996: 'USceneComponent::AttachTo': This function is deprecated, please use AttachToComponent instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
2>  U:\Repository\UnrealEngine\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(594): note: see declaration of 'USceneComponent::AttachTo'
2>U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Private\DonNavigationManager.cpp(51): warning C4996: 'USceneComponent::AttachTo': This function is deprecated, please use AttachToComponent instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
2>  U:\Repository\UnrealEngine\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(594): note: see declaration of 'USceneComponent::AttachTo'
2>U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Private\DonNavigationManager.cpp(1730): warning C4456: declaration of 'bFoundResult' hides previous local declaration
2>  U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Private\DonNavigationManager.cpp(1706): note: see declaration of 'bFoundResult'
2>U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Private\Legacy\DEPRECATED_VolumeAdaptiveBuilder.cpp(28): warning C4996: 'USceneComponent::AttachTo': This function is deprecated, please use AttachToComponent instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
2>  U:\Repository\UnrealEngine\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(594): note: see declaration of 'USceneComponent::AttachTo'
2>U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Private\Legacy\DEPRECATED_VolumeAdaptiveBuilder.cpp(175): warning C4996: 'USceneComponent::AttachTo': This function is deprecated, please use AttachToComponent instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
2>  U:\Repository\UnrealEngine\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(594): note: see declaration of 'USceneComponent::AttachTo'
2>U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Private\Legacy\DEPRECATED_VolumeAdaptiveBuilder.cpp(1109): warning C4458: declaration of 'NAVOverlapQuery' hides class member
2>  U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Classes\Legacy/DEPRECATED_VolumeAdaptiveBuilder.h(156): note: see declaration of 'ADEPRECATED_VolumeAdaptiveBuilder::NAVOverlapQuery'
2>U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Private\Legacy\DEPRECATED_VolumeAdaptiveBuilder.cpp(1110): warning C4458: declaration of 'ActorsToIgnoreForCollision' hides class member
2>  U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Source\DonAINavigation\Classes\Legacy/DEPRECATED_VolumeAdaptiveBuilder.h(159): note: see declaration of 'ADEPRECATED_VolumeAdaptiveBuilder::ActorsToIgnoreForCollision'
2>  [5/5] Link UE4Editor-DonAINavigation.dll
2>     Creating library U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-DonAINavigation.lib and object U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-DonAINavigation.exp
2>Module.DonAINavigation.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)" (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
2>DonAINavigation.generated.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)" (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
2>U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Binaries\Win64\UE4Editor-DonAINavigation.dll : fatal error LNK1120: 1 unresolved externals
2>ERROR : UBT error : Failed to produce item: U:\Unreal Projects\CDFStarfighter412\Plugins\DonAINavigation\Binaries\Win64\UE4Editor-DonAINavigation.dll


Seeing the error, I did some google-fu and came up with this quote :

This made me think that wasn’t the real issue so the last part seems to be something to note.



Module.DonAINavigation.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)" (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)


Any idea what’s up here ? I appreciate you are releasing a new version soon but I thought I would try compile first and have had no luck here.
Thanks again

[EDIT: bEnableShadowVariableWarnings = false; fixed the shadow variable issue and I was just left with deprecated warnings about the unresolved IGameplayTaskOwnerInterface error ]

[EDIT#2: I added “GameplayTasks” to the DonAINavigation.build.cs in the public dependencies and it compiled. Sorry for the distraction but I will leave this here to help others.]