I’m trying to build a turret that tracks the player. I’ve tried a number of things and it still isn’t sensing my player. My player’s collision settings are:
Generate overlap events and block events
Collision enabled (Query and Physics)
Collision response Block All.
My Turret:
AIPerception component added
Dominant Sense - AISense_Sight
There is a NavMesh on the map.
The turret’s blueprint just has an OnPerception Updated (AIPerception) connected to a print string.
Hi, two main reasons I can think of out of my head:
(-) Make sure you have detect neutrals enabled in your AI perception component (team is not implemented by default, everything is neutral and detection is set to detect hostiles only)
(-) Make sure that the pawns are either auto registering (default behavior unless you have disabled it/it has been disabled in your project), or that you add a perception stimuli source component to the player (or called something similar)
(-) And also as @DomusLudus said, the AI perception component should usually go into the controller, if you put it into the pawn it may not work correctly out of the box
Also you can use the AI debugger to debug it visually (see the vision range of the AI)