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

Vehicle Mirrors

Renders vehicle mirror reflections by computing reflection camera transforms from mirror node positions and the player camera.

Renders vehicle mirror reflections by computing reflection camera transforms from mirror node positions and the player camera.


Public API

FunctionSignatureDescription
M.onPreRender(dtReal, dtSim, dtRaw)Per-frame hook - triggers mirror data request and renders reflections
M.onVehicleSwitched(oldVehId, newVehId)Hook for vehicle switch (currently no-op)
M.onVehicleMirrorsChanged(id, data)Callback receiving mirror config from vehicle data

Internal Details

  • Mirrors are defined by 3 node IDs (id1, id2, id3) in vehicle data
  • Reflection direction is computed: camMirrorDir - 2 * project(camMirrorDir, lookDir)
  • Renders to a texture target at 128×128, 70° FOV, 0.1–250m range
  • Update rate is configurable (default 0.3s) with ImGui debug UI
  • Adds userCorrection vec3 per mirror for manual adjustment

Usage Example

-- Mirrors are loaded automatically via the extension system.
-- Mirror data comes from vehicle's JBeam definition.
-- The extension renders reflections to named texture targets
-- which materials reference on the mirror mesh.

Vehicle Bridge (GE ↔ VLua Communication)

Black-box communication layer between GE Lua and vehicle Lua (VLua). All gameplay-related VLua requests should go through this bridge via `gameplayInterface` on the vehicle side.

Vehicle Paints

Resolves, caches, and distributes vehicle paint data including paint libraries, paint collections, multi-paint setups, and random paint selection with weighted probability distributions.

On this page

Public APIInternal DetailsUsage Example