"Pawn Sensing" doesn't work

Hi guys,
I followed this tutorial: Unreal Engine 4 Tutorial - AI Pawn Sensing - YouTube

I made everything like the video, but the character with pawn sensing doesn’t follow me at all.
Should I do something else?

Regarding my project, I just have a normal character controlled by me with keyboard inside a normal scenario. Nothing particular has made inside of it.

Hi Tensa,
thank you for your reply.
Yeah I know that is deprecated, and will be replaced very soon by the AIPerception component, but since I really need something in a simple way for now, can I still use the Pawn Sensing component?

I mean, it still should work, right? I just want to understand why it doesn’t work.
AIPerception seems a little bit more complicated for now, I need to show something very simple as an example of interaction between characters.

Hi Marco,

the recommended approach regarding “Sensing” activities is to use the AIPerception Component. The Pawn Sensing Component seems deprecated by now and at least not maintained anymore.

Well, PawnSensing should still be functional, indeed.
Did you put the NavMesh on the map?

Uhm… no? I’m completely new to this, I made interior design usually! :smiley:
Is it complicated to do? What I have to do exactly?

Ok seems that it works now. :slight_smile: Thanks!

I spent several hours debugging this issue, if anyone else has the same problem, try registering the delegate function inside BeginPlay. I had it registered in the constructor and it was never called. I don’t know why we can’t use AddDynamic in constructors, but in some cases it just doesn’t work.
As soon as I moved it to BeginPlay everything worked as expected.

1 Like

You could try binding events in PostInitializeComponents(). That’s where ideally you should bind the events;