Camera Mode: Driver
First-person driver camera with physics-based head movement, seat adjustment, look-ahead, horizon stabilization, VR support, and per-vehicle saved configurations.
First-person driver camera with physics-based head movement, seat adjustment, look-ahead, horizon stabilization, VR support, and per-vehicle saved configurations.
Class API
| Method | Signature | Description |
|---|---|---|
C:init | () | Initializes smoothers, zoom, settings |
C:onVehicleCameraConfigChanged | () | Resets seat/node data for new vehicle |
C:onSettingsChanged | () | Reads all driver camera settings |
C:resetSeat | () | Resets seat position/rotation, triggers save |
C:resetSeatAll | () | Resets seat for all vehicles, clears saved configs |
C:reset | () | Resets look direction to center |
C:update | (data) | Full driver camera update with all effects |
C:setRefNodes | (center, left, back) | Sets vehicle reference nodes |
C:mouseLocked | (locked) | Handles mouse lock/unlock for autocenter |
Settings (from game options)
| Setting | Key | Description |
|---|---|---|
| Physics factor | cameraDriverPhysics | 0–100%, how much head follows physics |
| Autocenter | cameraDriverAutocenter | Return to center when driving |
| Seat adjustments | cameraDriverAllowSeatAdjustments | Enable WASD seat repositioning |
| Stable horizon | cameraDriverStableHorizon | 0–100%, horizon lock strength |
| Stable pitch | cameraDriverStablePitch | 0–100%, pitch stabilization |
| Look-ahead angle | cameraDriverLookAheadAngle | How much camera anticipates turns |
| Look-ahead smoothness | cameraDriverLookAheadSmoothness | Smoothing for look-ahead |
| FOV | cameraDriverFov | Driver camera field of view |
| VR snap turn | openXRsnapTurnDriver | Snap turn for VR headsets |
| VR horizon lock | openXRhorizonLockDriver | Full horizon lock in VR |
Key Features
Physics Head Movement
Interpolates between static initial node position and current physics node position based on physicsFactor. In VR, physics movement is disabled (factor = 0).
Look-Around
- Mouse/gamepad rotation: ±160° yaw, +40°/-60° pitch
- Autocenter mode: returns to forward when vehicle moves
- Keyboard: left+right simultaneous = look back
Head Lean-Out
When looking back past 70°, the camera moves laterally to simulate the driver leaning out the window. Factors in right-hand drive and B-pillar dodging.
Seat Adjustment
WASD+QE adjust seat position (Y/Z) and rotation. Settings are saved per vehicle model in cameraDriverVehicleConfigs.
Horizon Stabilization
Uses a transition zone (50°–70° pitch) to blend between following the vehicle and locking to the horizon. VR mode gets full horizon lock.
Look-Ahead
"Rock on a string" algorithm smoothly anticipates turn direction from velocity changes.
Usage Examples
-- Switch to driver camera
core_camera.setByName(0, "driver")
-- Reset seat position
core_camera.proxy_Player("resetSeat")
-- Driver data for external use
local nodeId, isRHD, isRHDoor = core_camera.getDriverData(veh)Per-Vehicle Config Storage
Saved in settings.cameraDriverVehicleConfigs as JSON:
{ "etk800": [0, 0.05, -0.02] } -- [seatRotation, seatY, seatZ]See Also
- Camera Mode: Autopoint - Related reference
- Camera Mode: Autozoom - Related reference
- Camera Mode: Big Map - Related reference
- Core Systems Guide - Guide
Camera Mode: Crash
Cinematic crash camera with multiple viewpoints. Supports cockpit POV from the second vehicle, overhead close-up, and stationary observer positions.
Camera Mode: External / Fan Camera
Cinematic external camera that automatically finds interesting viewpoints, pans, zooms, and switches angles. Features two modes: "fan" (handheld/spectator) and "TV" (smooth/broadcast).