Give AI Enemy Sight

Hey. I need to give my AI characters sight.

I used pawn sensing and it works fine but pawn sensing component doesn’t rotate with character’s head.

So I switched to behavior tree.

https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/15/index.html

This says :

Using a Dot Product node, make it so the AI Character only chases the player when they are in front of the AI.

Bonus: Instead of using the AI Character’s rotation as part of the Dot Product, use the rotation of the Head Joint.

Double Bonus: In the Animation Blueprint add functionality to control the rotation of the head joint, then create a service that has the AI look around.

How to do that? How can I use dot product to detect player?

So my question is HOW CAN I GIVE AI CHARACTERS SIGHT THAT ROTATES WITH HIS HEAD?

thanks. :slight_smile:

Problem Solved.

which blueprint did you add the dot product node to make the AI Character chase the player only when they are in front of the AI? I was thinking it would be in the RapidMoveTo Task blueprint but not sure

Add ai-perception to your ai controller. You get access to all of the pawn’s senses.

For more info: Getting Started with AI | Live Training | Unreal Engine - YouTube