Vehicle Controller

Main controller component that coordinates all vehicle systems. Attach this to your vehicle's root GameObject.
Architecture
Component-based system where each subsystem (powertrain, effects, sound, etc.) can be enabled/disabled independently. Uses StateSettings for LOD configuration.
Core Systems
Powertrain
Engine, clutch, transmission, differentials, and wheels. See Powertrain.
Control
Steering, brakes, and input handling.
Effects & Sound
Skidmarks, particles, lights, exhaust effects, and audio system.
Modules
Optional systems: ABS, TCS, ESC, Aerodynamics, Fuel, NOS, Trailer, etc. See ModuleManager.
Requirements
- Rigidbody (added automatically)
- WheelController 3D components on child objects
Physics Settings
Fixed Timestep: 0.01667 (60Hz) desktop, 0.02-0.03 mobile Solver: TGS recommended Rigidbody:
- Mass: 1000-2000 kg (cars), 3000-10000 kg (trucks)
- Drag: 0
- Angular Drag: 0.05
- Interpolation: Interpolate
Properties
Dimensions
dimensions - Vehicle size (Width × Height × Length) in meters. Affects inertia calculations.
Position References
enginePosition- For audio/effectsexhaustPosition- For particles/soundtransmissionPosition- For transmission audio
Thresholds
lateralSlipThreshold(0.15) - Lateral slip threshold for effectslongitudinalSlipThreshold(0.3) - Longitudinal slip threshold for effects
LOD
multiplayerInstanceType- "Local" for player vehicle, "Remote" for otherslodCamera- Camera for LOD distance checks (uses Camera.main if null)
State System
StateSettings ScriptableObject controls which components are active at each LOD level. See State Settings and LOD.
Update Order
Each frame:
- Update() - Input, state updates
- FixedUpdate() - Ground detection → Input → Powertrain → Steering → Brakes → Modules → Effects
- LateUpdate() - Visual updates (wheel models)
Component Lifecycle
All components inherit from VehicleComponent:
VC_Initialize()- SetupVC_SetDefaults()- Default configVC_Validate()- ValidationVC_Enable()/VC_Disable()- State changesVC_Update()/VC_FixedUpdate()- Updates
Events
onLODChanged- LOD level changedonWake/onSleep- Rigidbody stateonEnable/onDisable- Component state
Setup
Use Tools > NWH > Vehicle Physics 2 > Vehicle Setup Wizard for automatic configuration, or see Quick Start Guide.
Performance
- LOD system for distant vehicles
- Component pooling for effects/sounds
- Disable unused modules
- Increase Fixed Timestep on mobile (0.02-0.03)
Common Issues
Unstable physics: Lower Fixed Timestep, check center of mass, verify wheel/suspension settings
Poor performance: Enable LOD, reduce modules, check Fixed Timestep
No input: Check Input Provider assignment, verify vehicle is awake
See FAQ for more.