How to check if a point is reachable by pawn?

Got it!

UFUNCTION(BlueprintCallable, Category = "Midnight Sun BP Library")
	bool IsPositionReachable(FVector Position) {
		FVector PathStart = GetPawn()->GetActorLocation();
		UNavigationPath* NavPath = UNavigationSystem::FindPathToLocationSynchronously(GetWorld(), PathStart, Position, NULL);
		
		if (!NavPath)
			return false;

		return !NavPath->IsPartial();
	}
1 Like