Perception component for enemy AI not showing on C++
I've been trying to set up a simple perception system for a hack 'n' slash enemy AI, in which the enemy simply attacks the player if he sees him. In my base enemy class constructor, inheriting from ACharacter, I have:
However, when creating an enemy inheriting from this class, the perception component isn't there and there's no sense config options or any way to register the stimuli. I've also tried changing the perception component to a UPawnSensing class, but it still doesn't appear.
How do I make this perception component work?
asked Oct 11 '16 at 08:26 AM in C++ Programming
I think the perception component should mostly be used on the AIController rather than the character.
Then you can use the functions SetPerceptionComponent() & GetAIPerceptionComponent()
It will become something like this in MyCustomAIController.cpp :
Hope this helps :)
answered Oct 11 '16 at 09:21 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here