Unity Stealth AI: Light and Shadow Detection
Watch light and shadow change how quickly a Unity guard detects the player while distance, angle, posture, and line of sight continue to matter.
What this clip demonstrates
- Lighting scales detection speed instead of switching the AI on or off.
- Bright pools create risk while dark routes buy the player time.
- The lighting factor remains part of the same explainable awareness pipeline.
Implementation notes
Darkness works best as a bounded multiplier. It should slow detection and open alternate routes without making a player permanently invisible at point-blank range. The rest of the vision model still decides whether the target is visible at all.
The result is easy to communicate: moving under a lamp raises awareness quickly, while crossing a dark gap creates a longer reaction window. Because the light factor feeds the same awareness track, it can be shown in the debugger and tuned alongside every other influence.
Build the underlying mechanic
Add light-aware stealth detection in Unity using scene light sampling, occlusion checks, brightness multipliers, crouch-aware sample points, fair thresholds, and practical debugging.
Read: Light-aware stealth detection