I’m trying to find the closest point on navmesh in the editor. The Navigation is built but this method is always returns false with any extent. Also, UNavigationSystemV1::GetMainNavData() is always nullptr. Is it possible to access navdata in editor?
What happen if do it that way?
bool bChecker = false;
if (NavSys->ProjectPointToNavigation(CoverPosition, ProjectedPosition, FVector(2.f * CapsuleRadius, 2.f * CapsuleRadius, 2.f * StandCoverHeight)))
{
bChecker = 1;
}else{bChecker = 0; }
if(bChecker)
{
//print string using gengine or any macro if you have with message Success NavSys
CoverPosition = ProjectedPosition.Location;
}
else
{
//print string using gengine or any macro if you have with message UnSuccess NavSys
return:
}