MoveToLocation does not move character

AMyAIController* pMy = GetWorld()->SpawnActor(AMyAIController::StaticClass());
pMy->SetPawn(this);
pMy->GetPathFollowingComponent()->SetMovementComponent(GetMovementComponent());

pMy->MoveToLocation(FVector(1000));

I have tried pMy->MoveTo(…) 、pMy->GetPathFollowingComponent()->RequestMove(…); etc
but nothing happend
who can help me?

Hey watermoon123-

pMy is an AI controller. Calling MoveToLocation would move the location of the controller rather than the AI it is controlling. You would want to make the call on the actor itself rather than its controller.

Cheers

now it works fine to the existing character in project-FirstPerson, but doesn’t work to the spawn character