AMyAIController* pMy = GetWorld()->SpawnActor(AMyAIController::StaticClass());
I have tried pMy->MoveTo(…) 、pMy->GetPathFollowingComponent()->RequestMove(…); etc
but nothing happend
who can help me?
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.
now it works fine to the existing character in project-FirstPerson, but doesn’t work to the spawn character