If projection fails the version of ProjectPointToNavigation you’re using returns the input location. Consider increasing default navigation query extent (via SupportedAgents). The fact that it used to work for you in 4.6. may be related to our recent fixes to the projection that made it more reliable and precise.
One note, since you’re using C++, I suggest you used the ProjectPointToNavigation version that returns bool. The return value will tell you if projection was successful or not.
I’m using ProjectPointToNavigation to get the closest point in the navmesh of another point which is outside the navmesh.
The problem I have when I use this function is that the location returned is the same location of the point passed to the function
ProjectedPoint = GetWorld()->GetNavigationSystem()->ProjectPointToNavigation(GetWorld(),Player->GetActorLocation());
Player->GetActorLocation() is outside the navigation mesh
The returned point(ProjectPoint) is the same as Player->GetActorLocation(), this is not what it suppose to return.
I was using the same function on 4.6 ver and it was working.
Quick question;
Inside AAIController::MoveToLocation at AIController.cpp, line 553: ProjectPointToNavigation is being called with AgentProps.GetExtent(), which seems to be related to the agent’s height and not the value specified in SupportedAgents. Is this the intended behavior?