I’m doing the course in 4.20 and ran into the issue of ProjectPointToNavigation() not working. Error says it is not a member of UNavigationSystemBase.
After a few days of searching I found out that most Navigation System-related code has been moved out of the Engine code and into a new Navigation System Module.
So to get the code working I had to add “NavigationSystem” to the core modules in build.cs:
PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “NavigationSystem” });
In .h change: “AI/Navigation/NavigationSystem.h” to “NavigationSystem.h”
in .cpp change:
bool bOnNavMesh = GetWorld()->GetNavigationSystem()->ProjectPointToNavigation(HitResult.Location, NavLocation, TeleportProjectionExtent);
to:
UNavigationSystemV1* NavSystem = FNavigationSystem::GetCurrent(GetWorld());
bool bOnNavMesh = NavSystem->ProjectPointToNavigation(HitResult.Location, NavLocation, TeleportProjectionExtent);
Hope this helps someone