How Enemy AI Tracks Players Who Move Behind Obstacles

A player ducking behind a pillar has not become invisible — the enemy knows where they went. How enemies handle this moment of vision interruption shapes whether stealth behind cover feels reliable or arbitrarily broken. Players who use cover in games through 666 c rely on enemies behaving consistently when line of sight breaks, and that consistency comes from well-designed target tracking systems.

When visual contact breaks, the enemy does not lose all knowledge of the player — it retains the last confirmed position and a reasonable expectation of where the player may have moved. The key design principle is that the enemy should use what it genuinely knows without being granted information it could not have.

Target Tracking Components

Last Visible Position

Stored the moment vision is interrupted. This is not the player's actual current position — it is the last confirmed visible location. The enemy moves toward this position first.

Visibility Status Flag

Tracks whether the enemy currently has confirmed vision. When this flag switches from true to false, the enemy transitions from confirmed-tracking to prediction-based behaviour.

Movement Prediction

Based on the player's last observed velocity and direction, the enemy estimates roughly where the player may have gone. This prediction extends search priority toward the estimated exit direction of the obstacle.

Reacquisition Check

The enemy continues checking positions around the last known location. When the player re-emerges from behind cover and enters the vision cone, sight is reacquired and the confirmed-tracking flag resets.

The enemy's knowledge should be honest. It knows where it last saw the player. It does not know where the player is behind the wall. Bridging these two facts with sensible prediction — and not perfect knowledge — is what makes cover feel meaningful.

Tracking a player behind an obstacle does not guarantee that the enemy will regain sight of them. Searching after losing visual contact involves investigating the last known position, checking nearby routes, and deciding when to resume normal behavior.