Download

SimpleMoveToLocation acceptance radius

Hello. Can somebody add acceptance radius argument to SimpleMoveToLocation() of Engine / Source / Runtime / Engine / Private / AI / Navigation / NavigationSystem.cpp ?
It should look like this:


void UNavigationSystem::SimpleMoveToLocation(AController* Controller, const FVector& Goal, float AcceptanceRadius)
{
	UNavigationComponent* PFindComp = NULL;
	UPathFollowingComponent* PFollowComp = NULL;

	if (Controller)
	{
		Controller->InitNavigationControl(PFindComp, PFollowComp);
	}

	if (PFindComp && PFollowComp && !PFollowComp->HasReached(Goal, AcceptanceRadius))
	{
		const bool bPathExists = PFindComp->FindPathToLocation(Goal);
		if (bPathExists)
		{
			PFollowComp->RequestMove(PFindComp->GetPath(), NULL, AcceptanceRadius);
		}
	}
}

It’ll be helpful in some cases.

You’d probably be better off just making your own function for it, you could Get the actor location first and check it’s tolerance with the IsNearlyEqual functions. Shouldn’t be too difficult, but I’m not a great programmer so couldn’t tell you the best way to do it!

Well I’m too. But I ended up making such alternative function.