Haunted House VR Survival - Technical Development Report
Project Context
This project was developed for SIT283 - Development for Virtual and Augmented Reality as a complete VR gameplay prototype. The design goal was to deliver survival-horror tension while preserving VR comfort, interaction clarity, and deterministic gameplay behavior under real-time constraints.
The player explores a cursed house, destroys haunted dolls to progress, and survives encounters with an autonomous monster controlled by a finite state machine (FSM). The game loop combines locomotion, aim-based interaction, puzzle gating, and adaptive audiovisual feedback.
Core Technical Stack
- Engine: Unity 2021.3.11f1
- XR Runtime: Oculus Integration + XR Plug-in Management
- Navigation: Unity NavMesh for autonomous monster traversal
- Interaction: Controller-driven raycast shooting + handheld torch
- Animation/State: Animator Controller + script-driven state transitions
- Audio: Ambient layering + proximity-based monster cues
System Architecture
The runtime is split into independent systems with explicit event boundaries:
- Player Locomotion Layer
Character Controller attached to the VR rig for collision-aware movement and controller input mapping. - Interaction Layer
Gun and torch are bound to hand controllers and emit actions to combat/lighting systems. - Monster AI Layer
FSM with NavMesh movement and conditional transitions (Idle -> Patrol -> Chase -> Attack -> Death). - Progression Layer
Doll destruction increments progression, modifies threat pressure, and triggers audio/narrative cues. - Experience Controls Layer
In-game brightness/volume parameters, start flow, and scene reset path.
VR Movement and Comfort Engineering
Continuous rotation produced discomfort in early testing, so locomotion was redesigned around:
- Joystick translation via Character Controller
- Snap turning increments to reduce motion sickness
- Collision-consistent movement to avoid camera clipping and disorientation
This change directly improved player comfort while preserving responsiveness during pursuit sequences.
Monster AI: Finite State Machine + NavMesh
The monster behavior is implemented as a finite state machine with deterministic transitions:
- Idle: waits for sensory trigger (distance, visibility, or event)
- Walking/Patrol: roams house via NavMesh path points
- Chasing: engages when player enters detection envelope
- Attacking: active when player is within strike radius
- Dying: terminal state with animation playback
State transitions are driven by proximity thresholds, player actions (gunfire, doll destruction), and animation synchronization. NavMesh integration prevents obstacle lockups and produces believable traversal in constrained corridors.
Combat and Tooling
Gun
- Raycast-based hit resolution from controller-aligned muzzle
- Immediate feedback through muzzle flash, impact logic, and recoil tuning
- Designed for fast aiming under headset motion
Torch
- Hand-tracked directional lighting for environmental probing
- Used as a mechanic to amplify tension and cue threat locations
Inventory Availability
- Gun and torch are persistently available to avoid interaction deadlocks
- Improves fail-state recovery during high-pressure encounters
Audio and Sensory Pipeline
The audio design is functional, not cosmetic:
- Persistent low-frequency ambient layer for baseline tension
- Proximity-scaled monster audio for directional threat telemetry
- Event-bound SFX (doll destruction, gunfire, environmental creaks)
Overlap and clipping issues were resolved using boolean event flags and coroutine-based sequencing so one critical cue does not mask another.
Lighting Strategy and Performance
Dynamic flicker contributes to horror atmosphere but can destabilize frame timing in VR. The final implementation constrains flicker events to high-impact windows (monster nearby, key narrative beats) instead of constant updates. This preserves atmosphere while reducing expensive dynamic-light churn.
Failure Modes and Resolutions
Major engineering issues solved during development:
- VR discomfort during turns -> switched to snap turning.
- AI state instability -> explicit transition guards + Animator integration.
- Inaccurate gun feel -> raycast trajectory + recoil + hit feedback.
- Lighting-induced frame drops -> conditional flicker activation.
- Unfair monster pressure -> rebalanced detection/chase/attack distances.
- Audio clipping/stacking -> single-fire flags + coroutine spacing.
- Nav path failures -> waypoint and NavMesh tuning.
- Reset friction in playtests -> scene reload utility and start screen flow.
Build and Run Characteristics
- Developed and tested with Oculus headset + Touch controllers
- XR Plug-in Management enabled with Oculus target
- Scene reload utility supports rapid iteration and user retry loops
Visual Evidence




Engineering Outcome
The final prototype demonstrates a complete VR gameplay slice with integrated locomotion, AI, interaction, sensory feedback, and restart flow. Most importantly, it balances horror intensity with VR usability constraints, which is the key technical challenge in this genre.
References
- Oculus Developer Documentation
- Unity NavMesh documentation
- Unity Animator Controller documentation
- Unity CharacterController and Physics.Raycast documentation


