My NPC pawn dummy does not sence any NPC Character

Hello, I am trying to make a pawn that sees/hears enemies, but i can’t get it work.

To make super simple example I created a dummy pawn, only placed a box mesh and a AIPerception component, settings on figures.


I then created a dummy character, only placed a SKM_Quinn Sceletal mesh and then added a AIPerceptionStimuliSource, settings on figure.

I placed my dummy character around my dummy pawn in every direction:

And created a desparate all-events call in the Pawn blueprint:

According to tutorials this should work, but when I hit play, no message appears. What am I doing wrong?

Id recommend an AI controller, and setup the perception handling there, also for hearing you have to call sound sound events from other events/functions

2 Likes

Thanks for the reply - transferring the AIperception to the AIController did the trick :slight_smile: But how do I add a dummy sound effect? PawnNoiseEmitter seems to do nothing at all. I would actually like to make 360° sight perception but it is obviously clamped at 180° so I am stucked with hearing.

I just use the “play sound” node on event, or if your referring to hearing it’s an AI perception sound event I can’t remember the exact name I’ll check when I’m off work

Hi, you can use ReportNoiseEvent to report something to the hearing sense. Also if you set the Peripheral Vision Half Angle in the sight sense to 180 you have 360 degree sight (you set the half angle, so the actual vision angle is twice that).

But sight sense updates on tick, doing actual line traces to all potential targets in range and vision angle (so the sight sense is rather costly). Hearing sense only updates event driven (when you call the ReportNoiseEvent) and by default does no line traces, so its cheap (if you don’t spam the ReportNoiseEvent).

Thank you! It works even without a AIStimuliSource component :slight_smile: I only hope to understand the logic behind this one day…

By default all pawns register as sources (you can disable that in the config). So by default you do not need to add any AIStimuliSource components to pawns, they automatically register. Also if I remember correctly the AIStimuliSource component only does something for the sight sense, for the other senses like hearing its not doing anything, those do not need any registering at all.

1 Like