Enemy AI Perception


“Problems with Ai Perception”

author: Joseph Horsch

Posted on 4/18/2025

Blog Entry Part 1: The Problem

Goal:  For our game, Project Meltdown, we want the game to be multiplayer compatible.  In Zombies, enemies will always target one player at all times so why do they need perception?  In a multiplayer environment, enemies need to be able to retarget to a closer target if in range. So my goal is to create a range where the first enemy will target the player at all cost even if it is past its own sight range and if the target player is not in range to check if there is a new target in range.  

  • The Problem I encountered was setting up perception.  When creating the perception debugger I kept encountering invalid sight causing to look back at my code setup.

Blog Entry Part 2: Problem Solution

Unreal 5 and up ai perception system is designed that an aiController can automatically grab the AActor off of and  actor in range allowing to distinguish that code was not the problem.  After multiple testing I found that there were two causes to the perception system not working.

  • neutrals were not checked true
  • hierarchy of blueprint creation

I believed it was just the wrong check box at first but I found inconsistency so I took the time to reparent the blueprints and child creation order.  After rebuilding the first enemy and their sightConfigs we now have visible sightlines for enemies to use.  


Blog Entry Part 3: What I am Working on Next

Since AiPerception is created, my goal is to start making the enemy move towards the player no matter what range.  These behaviors I will be working on next will be usable by all future enemies since our game doesn't or shouldn't contain searching for new targets.  Then I will create the first unique behavior to the first enemy, the first attack.  

Leave a comment

Log in with itch.io to leave a comment.