GetPawn() in AIController always gives me null
Hi everybody! I have a problem with AIController class: when I call GetPawn() function it always give me a null pointer. This is my AMyAIController.cpp:
And this is MainCharacter.cpp:
what am I doing wrong?
asked Oct 05 '15 at 05:09 PM in C++ Programming
I believe the function that you're looking for is GetControlledPawn which is a function of AController. AAIController inherits from AController so you'll be able to access this function. You can find more functions of these two classes here:
Hope this helps!
answered Oct 05 '15 at 09:23 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here