Hi,
Having an issue with the AI perception component on my enemy actor. If I add multiple senses to an AIPerception component, all but the first created are ignored, even if I move the array elements around.
In the example I have an emeny with an AIPerception component with 2 senses. Hearing and sight. The debugger only shows hearing and only lists hearing as an active listener. A print string node activates when hearing is triggered but not when I would expect sight to trigger. If I create a second AIPerception component with sight I can have both senses trigger, although hearing is still the only sense shown visually in the debugger. I’m following the tutorial on this link https://www.youtube.com/watch?v=gsyZdKYAT_4&t=1573s&ab_channel=AliElzoheiry. I’d rather not have 2 components because I’d then be dealing with 2 different events when senses are triggered. Any help or insights would be greatly appreciated.
All but the sight perception sense are event driven, do you have hearing events called in appropriate places?
Thanks for your response,
I have my character producing sounds that the AI can hear on each footstep and the hearing is triggering as in the screenshot. I have the “On Perception Updated” event just printing “Hello” which it does fine for hearing but not sight. If I recreate the AIPerception component and create the sight sense before hearing then the results are all the opposite way around, sight works fine but hearing doesn’t.
Even without events tied or actors making sounds, I would expect to see the debug for each sense as in the screenshot below from the linked tutorial. Where green and purple are sight and yellow is hearing.
Turns out it’s just this one character blueprint. I added another and put 2 senses and they work fine. Not sure what’s happened to this first one.
I just remade the BP and now it’s all working. Odd