A third person camera controller with dual camera modes and cross-platform controls built with Three.js.
- Dual Camera Modes: TPP (Third Person) and Orbit modes with smooth transitions
- Cross-Platform Controls: Desktop keyboard/mouse + mobile touch controls
- Virtual Joystick: Mobile-friendly joystick with tap-to-jump functionality
- Visual Feedback: On-screen buttons highlight when keyboard keys are pressed
- Responsive UI: Clean interface that adapts to different screen sizes
- Three.js - 3D graphics library
- Vite - Build tool and dev server
- lil-gui - Debug interface
- SCSS - Styling
- three-perf - Performance monitoring
- Built on top of: threejs-gamedev-template
- Node.js (v16 or higher)
- npm or yarn
- Clone the repository
git clone <your-repo-url>
cd TPP-Orbit-Camera-Controller- Install dependencies
npm install- Start the development server
npm run dev- Open your browser and navigate to
http://localhost:5173
- WASD/Arrow Keys - Move player (buttons highlight when pressed)
- Space - Jump
- C Key - Switch camera modes
- Mouse - Camera rotation (Orbit mode)
- Virtual Joystick - Drag to move, tap to jump
- Jump/Sprint Buttons - Dedicated action controls
- Camera Toggle - Switch between TPP/Orbit modes
- Touch & Drag - Camera rotation (Orbit mode)
- TPP Mode: Camera follows behind player for gameplay
- Orbit Mode: Free camera rotation around player for inspection
This project is for educational and demonstration purposes under the MIT license.