This blueprint function behaves differently than the c++ functions since it returns an async task. That blueprint version is blueprint internal, so you can’t use it directly in c++.
Instead, you can use any of the following. The first one is the closest function to the blueprint one, and the most powerful:
It looks like there’s a function that gets called when a move is completed that you can use in AAIController: virtual void OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult& Result);
There’s also a delegate that gets fired by that function: FAIMoveCompletedSignature ReceiveMoveCompleted
can you please tell me where to call MoveToDestination.
Does the AI that owns it automatically call this function?
i tried to GetController in a AI and cast it to AIController but it failed.
Yes, you’re right.it will leads to a situation that i have to get AI and write AI move function in AMyAIController. it should work just fine. but it feels a little weird for me to write AI logical code in AIController . hahahahha