RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
Activity ManagerAudio Bank ManagerAudio Ribbon SystemBus Route ManagerCamera SystemCore Chat (IRC)Core CheckpointsCore Command HandlerCoupler Camera ModifierDevices (RGB Peripherals)Dynamic PropsEnvironmentFlowgraph ManagerForestFun StuffGame ContextGame StateGround Marker ArrowsGround MarkersHardware InfoHighscoresHotlappingInventoryJob SystemLap TimesLevelsLoad Map CommandMetricsMod ManagerMultiseatMultiseat CameraMulti SpawnOnlinePaths (Camera Paths)Quick Access (Radial Menu)Recovery PromptRemote ControllerReplayRepositoryRope Visual TestScheme Command ServerCore SnapshotCore SoundsCore TerrainTraffic SignalsTrailer RespawnVehicle Active PoolingVehicle Bridge (GE ↔ VLua Communication)Vehicle MirrorsVehicle PaintsCore VehiclesVehicle TriggersVersion UpdateWeather SystemWindows Console

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionscore

Multiseat Camera

Automatic camera system for multiseat mode. Calculates a shared camera view that encompasses all player vehicles by averaging positions and adjusting distance/FOV dynamically.

Automatic camera system for multiseat mode. Calculates a shared camera view that encompasses all player vehicles by averaging positions and adjusting distance/FOV dynamically.


Public Functions

FunctionSignatureDescription
M.onUpdate()Updates camera to frame all player vehicles (nop when disabled)
M.onSettingsChanged()Enables/disables based on multiseat setting
M.onSerialize()Disables multiseat camera before serialization

Camera Algorithm

Each frame when enabled:

  1. Average position - Computes mean position of all player vehicles
  2. Max distance - Finds the farthest vehicle from the mean, doubles it + 10m padding
  3. Direction - Derived from frame-to-frame position delta
  4. Apply - Sets camera target, distance, FOV (40°), and reference frame via core_camera

Camera Settings Applied

SettingValueDescription
Target mode"notCenter"Offset target mode
DistancemaxDistanceDynamic based on vehicle spread
Max distancemath.hugeNo upper limit
FOV40Fixed narrow field of view
ReferencetargetCenter, left, backComputed orientation vectors

Usage Example

-- Multiseat camera is controlled by the "multiseat" setting
-- It activates/deactivates automatically via onSettingsChanged

-- Manual control (internal):
-- setEnabled(true)  -- activates camera and hooks onUpdate
-- setEnabled(false) -- resets all vehicle cameras to default

Enable/Disable Behavior

  • On enable: Resets camera for player 0's vehicle, begins tracking
  • On disable: Resets camera configuration and per-vehicle references for all vehicles
  • On serialize: Auto-disables to prevent stale state

Notes

  • Uses core_input_bindings.getAssignedPlayers() to determine which players have vehicles.
  • Camera follows the mean position with a smooth direction vector.
  • The onUpdate function is swapped between nop and the real implementation via setEnabled.
  • Requires core_camera to be loaded.

See Also

  • multiseat - Input device assignment for local multiplayer
  • globals - core_camera API

Multiseat

Local multiplayer input assignment. Maps input devices (keyboards, gamepads) to player slots and seats players into vehicles. Supports up to 64 simultaneous players.

Multi Spawn

Spawns groups of vehicles in configurable formations (road, grid, line). Handles vehicle selection from installed data with population-weighted randomization, paint assignment, and formation placement

On this page

Public FunctionsCamera AlgorithmCamera Settings AppliedUsage ExampleEnable/Disable BehaviorNotesSee Also