Final Year Project · Sem 6 · Figma · Unity · C# · MediaPipe · In Progress

NeckXR

An AR-based exergame for cervical rehabilitation — real-time head tracking, gamified training, and clinically informed feedback.

SDCZK2993 / SDCZK3993 Academic Project  ·  Final Year Project  ·  Individual
Semester
Sem 6In Progress
Tools
Figma · UnityMediaPipe · Supabase · C#
Platform
Windows PCStandalone
My Role
IndividualSolo end-to-end
Research
63 Respondents+ Physiotherapist Interview

Overview

NeckXR is an AR-based exergame designed to support safe, accessible neck rehabilitation and preventive training for university students and working adults. Using real-time head and posture tracking via MediaPipe, the application guides users through clinically informed neck exercises with immediate visual and audio feedback, gamified scoring, and session progress tracking.

The project addresses a documented gap: up to 50% of patients fail to complete home rehabilitation programmes due to lack of motivation, poor technique guidance, and absence of real-time correction. NeckXR responds with a feedback-driven system that supplements — but does not replace — professional physiotherapy.

NeckXR — Demo Video

Research Foundation

Online Survey — 63 Respondents

  • 76.3% experience neck discomfort regularly
  • 73% prioritised real-time posture correction as the most important feature
  • 73% preferred hybrid interaction (head rotation + hand gesture)
  • 71.4% preferred sessions under 5 minutes per day

Expert Interview

  • Puan Siti Hajar Binti Mohd Dzohir — physiotherapist, 16 years clinical experience, Director of One Stop Physiotherapy Centre, Changlun, Kedah
  • Key insights: biofeedback importance, safe movement thresholds, compensatory movement detection, and structured calibration before training

UX Design

Information Architecture

  • 7 primary modules: Authentication, Medical Disclaimer, Main Dashboard, Calibration System, Training Session, Progress, Settings
  • Hub-based navigation with the Main Dashboard as the central access point — minimising cognitive load for users with varying technical familiarity

User Flow

  • Safety-first gatekeeping: users must accept the Medical Disclaimer and complete calibration before accessing any training features
  • Training flow supports pause, resume, and exit controls to maintain user autonomy during sessions

Wireframes — 25 Screens

  • Splash · Sign In · Sign Up · Forgot Password · Forgot Password (Email Sent)
  • Medical Disclaimer · Dashboard (pre-calibration)
  • Calibration Setup · Calibration Steps ×4 (Flexion, Extension, Left, Right) · Calibration Processing · Calibration Complete
  • Dashboard (post-calibration) · Choose Training · Active Training Session · Training Pause Menu · Training Complete
  • Progress and History · Settings · Edit Profile · Edit Profile (Success) · Change Password · Change Password (Success)

Figma Wireframe

Open Figma Wireframe ↗

Key Design Decisions

Technical Implementation (~50% Complete)

Tracking & Calibration

  • WebCamController.cs — device enumeration, WebCamTexture start/stop, vertical flip correction
  • MediaPipe Unity Plugin v0.16.3 — PoseLandmarker at ~30fps, 33-point pose data via EventBus
  • HeadPoseEstimator.cs — real-time Yaw, Pitch, Roll from landmark offsets; LandmarkSmoother low-pass filter (α = 0.35)
  • CalibrationManager.cs — 4-step guided calibration (Forward Flexion, Backward Extension, Left/Right Rotation); 60-frame neutral posture baseline

Training & Scoring

  • RepetitionDetector.cs — state machine (Idle → MovingToTarget → HoldingPeak → ReturningToNeutral); 0.3s minimum hold to prevent false positives
  • ExerciseRunner.cs + TrainingSession.cs — 4-exercise sequence; Beginner, Intermediate, Advanced difficulty
  • CompensatoryDetector.cs — shoulder elevation, trunk lean, head forward thrust via consecutive-frame threshold (8 frames)
  • ScoreCalculator.cs — score = completion ratio × compensatory penalty × 1000; saved to Supabase training_sessions
  • TrainingDataService.cs — Supabase fetch ordered by created_at DESC; local cache for offline display

Remaining phases: performance optimisation, IL2CPP Windows build packaging, and user testing.

← Back

XR & 3D Work

All Projects