I am working on creating a utility AI setup and the framework is mostly complete. Now I am looking to do some testing and I running into a problem that seems very silly.
So I have a c++ Character class called FriendlyNPC and right now there is nothing in it but a Skeletal mesh component. I created a BP off of it and added the mannequin mesh to it.
Also set the AI Controller Class in the editor to AIController.
Then I added my AI brain component (which is the core component of my Utility AI and used an actor component for that).
Now where I am running into my issue is for the life of my I can not get the AIBrainComponent to access the AIController… Essentially I want to be able to call the MoveTo() function and have the AI feed it coordinates based off criteria for testing.
This seems like a very basic question but I am just not familiar enough with Unreal to figure out what the heck I am doing wrong. Its got to be something simple and stupid I am missing. Any Suggestions or insight would be appreciated.
Thank you for replying. That was what I was thinking. However, I get an error “class “AActor” has no member “Get Controller””.
GetOwner() is successfull however the GetController function is not. I can use GetInstigatingController() but not strait GetController();
I am guessing this has something to do with not having access to the pawn somehow. I am just not sure how to resolve it. So somehow mabye go ActorComponent → Actor → Pawn → GetController?>
I’m currently working on AI system too and this is what I do. Actor class do not have controller, so it has to be a Pawn at least. You need to cast Pawn and then access to the controller.
I am at a conference for another day and can not really test it I am home but I will update the post when I do in case anyone else has the same issue in the future.