VR/Game Dev

Haunted House VR Survival (SIT283)

A Unity + Oculus VR horror prototype focused on low-latency interaction, finite-state monster AI, spatial audio cueing, and performance-safe lighting for comfort-first immersion.

VR/Game Dev6 technologiesMar 2026
Category
VR/Game Dev
Tech Stack
6 items
Released
Mar 2026

Visual Highlights

VR horror corridor concept art
Concept-driven atmosphere framing the survival-horror loop.
Finite state machine diagram for monster AI
Monster AI orchestration through a deterministic state machine.
In-engine Unity gameplay scene
In-engine scene composition with comfort-focused interaction flow.

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:

  1. Player Locomotion Layer
    Character Controller attached to the VR rig for collision-aware movement and controller input mapping.
  2. Interaction Layer
    Gun and torch are bound to hand controllers and emit actions to combat/lighting systems.
  3. Monster AI Layer
    FSM with NavMesh movement and conditional transitions (Idle -> Patrol -> Chase -> Attack -> Death).
  4. Progression Layer
    Doll destruction increments progression, modifies threat pressure, and triggers audio/narrative cues.
  5. 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:

  1. VR discomfort during turns -> switched to snap turning.
  2. AI state instability -> explicit transition guards + Animator integration.
  3. Inaccurate gun feel -> raycast trajectory + recoil + hit feedback.
  4. Lighting-induced frame drops -> conditional flicker activation.
  5. Unfair monster pressure -> rebalanced detection/chase/attack distances.
  6. Audio clipping/stacking -> single-fire flags + coroutine spacing.
  7. Nav path failures -> waypoint and NavMesh tuning.
  8. 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

Cover concept showing first-person flashlight exploration in a decaying hallway
Atmosphere target: low-light corridor navigation with constrained visibility and directional tension.
Monster AI finite state machine diagram
FSM design used to coordinate monster idling, patrol, chase, attack, and terminal transitions.
Unity assets and project structure screenshot
Unity project organization including XR, scripts, animation, and horror environment assets.
In-engine scene setup for VR horror environment
Representative in-engine setup used for scene composition and interaction testing.

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