I’m currently trying to figure out how to get a Navigation path for my pawn in C++.The way I’ve seen people get the path is by using GetWorld()->GetNavigationSystem()->FindPathToLocationSynchronously(). But, in UE4 4.2, GetWorld()->GetNavigationSystem() returns a NavigationSystemBase which doesn’t have the find path functionality. Does anyone know how I can find a path in 4.2 in c++?
Also the documentation online is out of date for the include for NavigationSystem.h, its now located in Runtime/NavigationSystem/Public/NavigationSystem.h
So my first answer worked on my work project and my second answer worked when I was in the UE4 Advanced Car template project. I’m pretty sure they are both engine version 4.20, so idk whats up with that.
Wow thanks for the tip about adding the navigation system to the build.cs file. Don’t know how you figured it out but that worked out for me.
I was already pulling my hair out trying to figure out why the linker couldn’t find the definition for FindPathToLocationSynchronously().
Wow thanks for the tip about adding the navigation system to the build.cs file. Don’t know how you figured it out but that worked out for me.
I was already pulling my hair out trying to figure out why the linker couldn’t find the definition for FindPathToLocationSynchronously().