How to add Pawnsensing to my AI Behaviortree?

I don’t see you using PawnSensing anywhere in this setup! You’ve reimplemented the pawn vision system based on that tutorial you initially posted and frankly, this is not the best or most efficient way of doing it. You don’t need a service node for PawnSensing to work. You would instead use a blackboard decorator as a condition check and change the value of decorator in your AIController. Here’s a very simple AI system using AIPerception and behavior tree to move the AI pawn towards the player (I’m using AIPerception for reasons I told you before and also because it makes setting up the logic easier by giving me that extra boolean input that is true when the AI has seen the pawn and false when it has lost sight of it. You would also need a NavMesh for behavior tree task Move To to work).

AIController:

Blackboard

226784-blackboard.png

Behavior Tree

Though this simple dumb AI will probably chase you forever if your speeds are the same :smiley: Try to get out of its sight (maybe with spectator pawn) and you’ll see that the decorator OtherPawn will become null, causing the selector to fail and your AI to stop in its place.