Smart Horror AI
Customizable horror AI with wander, chase, and teleport mechanics, jumpscare triggers, and immersive hiding mechanics for a terrifying player experience.

* This page contains affiliate links, meaning we may earn a small commission if you purchase something through them, at no extra cost. $15
- Category:
- Templates › Systems
- Developer:
- Despair
- Price:
- $15
- Favorites:
- 4
- Supported Unity Versions:
- 2021.3.19 or higher
- Current Version:
- 1.0
- Download Size:
- 17.74 MB
- Last Update:
- Feb 25, 2025
- Description:
Fully customizable horror AI that allows you to tweak detection, footstep sounds, jumpscares, and teleport logic. Seamlessly integrate hiding mechanics, scene transitions, and crosshair feedback. The package supports multiple render pipelines, including Standard/Built-In, Universal, and High-Definition.
The AI controller features sight detection, sound detection, wandering, teleportation, dynamic music, and a footstep system. The hiding mechanics include camera switching, cabinet interaction, cabinet animations, and crosshair feedback. The scene management system allows for delayed transitions and loading screens. The package also includes customization options for AI parameters, audio layers, animation control, and interaction cooldowns.
The player controller system includes an energy system, footstep system, crouch system, and mouse look system. The technical notes provide information on the required NavMesh, player tag, and layer masks. The package is optimized for a workflow with prefab-ready scripts and inspector tools.
- Technical Details:
AI Controller
- Sight Detection: Uses viewAngle and viewDistance to detect players within a cone of vision.
- Sound Detection: Detects audio sources via hearingRange and volumeThreshold.
- Wandering: Moves randomly within wanderRadius at wanderInterval intervals.
- Teleportation: Randomly spawns near player (spawnNearPlayerDistanceRange) or behind them (CloseSpawnNearPlayerDistanceRange).
- Dynamic Music: Plays actionMusic during chases and BehindSpawn on teleport.
- Footstep System: Plays surface-specific sounds via footstepSounds list and raycast detection.
- Jumpscare: Triggers ThingsThatShouldBeTurnOn/Off and loads PreviousScene on player contact.
Hiding Mechanics
- Camera Switching: Swaps between mainCamera and childCamera with smooth animations.
- Cabinet Interaction: Uses HidingRaycast to detect cabinets within interactionDistance (layer: LayerMaskInteract).
- Cabinet Animations: CabinetAnimator plays "Cabinet" (open) and "CabinetClose" (exit) via Cabinet.cs.
- Crosshair Feedback: Changes color (red/white) via CrosshairChange() during interactions.
Scene Management
- Delayed Transition: Waits for JumpScareAnimation.length before loading sceneId.
- Loading Screen: Displays progress via LoadingBarFill during async scene load.
Customization
- AI Parameters: Adjust detection ranges, teleport chances (CloseTeleportChance), and cooldowns.
- Audio Layers: Link sounds to surfaces (e.g., "tag" in FootstepSound class).
- Animation Control: Define cabinet/camera animations in HideCamera.cs and Cabinet.cs.
- Interaction Cooldown: interactionCooldown prevents spamming cabinet interactions.
Player Controller System
- Energy System: Manage stamina or other resources during gameplay.
- Footstep System: Adds immersive footstep sounds based on player movement and surface type.
- Crouch System: Customizable crouching options, with support for both “hold to crouch” and “press to crouch.”
- Mouse Look System: Advanced mouse look controls with head bobbing for first-person perspective.
Technical Notes
- NavMesh Required: AI uses NavMeshAgent for pathfinding.
- Player Tag: Ensure player is tagged as "Capsule" for detection.
- Layer Masks: Assign audioLayer and LayerMaskInteract for sound/interaction systems.
Optimized Workflow
- Prefab-Ready: Scripts are modular for drag-and-drop setup.
- Inspector Tools: Variables include [Tooltip] and [Header] for clarity.
- Continue »