Physics-Based Rolling Controller for Unity
The Ball-Marble Controller is a production-ready, physics-driven rolling ball system built for Unity. Perfect for marble games, 3D platformers, obstacle courses, and physics-focused experiences, this asset delivers responsive torque-based movement, custom gravity, flexible camera modes, and full mobile input support.
Designed with clean architecture and modular components, it is easy to extend, customize, and integrate into both small prototypes and full-scale games.
Core Features
Physics-Based Ball Movement
- Torque-driven rolling using Rigidbody physics
- Custom gravity with configurable strength and direction
- Reliable jumping with SphereCast ground detection
- Speed boost and impulse force support
- Uncapped angular velocity for high-speed marble gameplay
Advanced Camera System
- Velocity Orbit mode that follows movement direction
- Over-the-Shoulder mode for stabilized third-person control
- Slope-aware pitch adjustment for uphill and downhill visibility
- Smooth damping and collision avoidance to prevent clipping
- Runtime camera mode switching
Multiple Input Methods
- Keyboard and controller support using Unity Input axes
- Mobile-ready touch and swipe input with DPI scaling
- Camera-relative movement calculation for intuitive control
Collision and Effects
- Impact-based landing particle effects
- Predictive collision handling for destructible environments
- Configurable physics materials for friction and bounce control
Clean Character Architecture
- Central Character hub connecting all subsystems
- Shared CharacterComponent base class for easy access
- Clear separation between input, physics, camera, and effects