How can i get onhear and onsight etc(AIPerception) in c++ PLEASE help!

Hello. Im working on making and AI using AIController and AIPerception in it. I’ve set up sight and hearing but i have no idea how to get on hear and on sight kind of thing used in old pawnsensing. So basically i want AI to do something when heard something and i dont know which function i need to use, where i can code. Please help. I have asked question related to AIPerception(c++) before and its been more then a week now and didnt get one answer.

What you’re asking for could be done a couple different ways. I think the easiest would be attaching a collision object on your ai and increasing the size based on sight range. Once an object collides with the collision project you can draw a raycast from the ai’s “eyes” and if nothing collides inbetween then you could return true. The hearing would work pretty much the same way without the raycast.

Thank you for replying. Ya it can be done like you said. Also the one thing that im really struggling with is Senses. I have AIPerception set up. I also have OnTargetPerceptionUpdated function. The problem is this OnTarget will be triggered for all Senses. But what i trying to do is have Ai react differently on sight and hearing. Is there a way to target specific sense?