I have verified that my hit result has hit my character, it’s giving me an instance of my character class, however, I now want to grab its AIController component so I can send it commands.
One more thing to note, my character actually has its own type of AIController class - MinionController, but I’m trying to use the MoveToLocation node which requires an AIController input.
So the correct way of doing this is to cast from the Hit Actor output to Pawn, then Get Controller on the pawn and cast that to an AIController.
I have noticed though that this WILL work when my characters are created with the SpawnAIFromClass node but NOT the SpawnActorFromClass node.
This makes me think there’s nothing in the data that actually binds the Character to the Behaviour Tree and the two have to be married at runtime. Is this correct?
This makes me think there’s nothing in the data that actually binds the Character to the Behaviour Tree and the two have to be married at runtime. Is this correct?
Yes. Character is basically a body, while Behavior Tree in concept belongs to the brain (an AIController with a BehaviorTreeComponent)