Target Tracks Perception System A developer implemented a perception system for game AI agents, adapted from Crytek's Target Tracks system. The system uses sight and awareness thresholds to track targets and adjust agent behavior, including turning toward perceived threats and changing alert states. | // Adapted from Game AI Pro - Crytek’s Target Tracks Perception System | | | using System.Collections.Generic; | | | using UnityEngine; | | | namespace Perception { | | | public class PerceptionAgent : MonoBehaviour { | | | region Fields | | | Header "Sight" | | | SerializeField float viewRange = 15f; | | | SerializeField float primaryFov = 90f; | | | SerializeField float peripheralFov = 160f; | | | SerializeField LayerMask obstructionMask = ~0; | | | Header "Awareness" | | | SerializeField float alertThreshold = 25f; | | | SerializeField float highAlertEnter = 50f; | | | SerializeField float highAlertExit = 35f; | | | SerializeField float turnSpeed = 4f; | | | readonly Dictionary