RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Editor AI TestsEditor AI VisualizationEditor – Assembly Spline ToolAsset BrowserAsset DeduplicatorAsset Management ToolSFX Previewer (Audio Events List)Audio Ribbon EditorAutoSaveBarriers EditorBiome ToolBuilding EditorBulk RenameCamera BookmarksCamera TransformCamera Path EditorCEF HelperCo-Simulation Signal EditorCrawl Data EditorCreate Object ToolDataBlock EditorDecal EditorDecal Spline EditorDocumentation HelperDrag Race EditorDrift Data EditorDrive Path EditorDynamic Decals Tool (Vehicle Livery Creator)Engine Audio DebugExtensions DebugExtensions EditorFFI Pointer Leak TestFile DialogFlowgraph EditorForest EditorForest ViewEditor Gizmo HelperEditor Ground Model Debug HelperEditor Headless Editor TestEditor Icon OverviewEditor ImGui C DemoEditor InspectorEditor Layout ManagerEditor Level SettingsEditor Level ValidatorEditor LoggerEditor Log HelperEditor MainEditor Main MenuEditor Main ToolbarEditor Main UpdateMap Sensor EditorMaster Spline EditorMaterial EditorMeasures Inspector HeaderMesh Editor (Base)Mesh Road EditorMesh Spline EditorMission EditorMission PlaybookMission Start Position EditorMulti Spawn Manager (Vehicle Groups)Navigation Mesh EditorEditor News MessageObject Tool (Object Select Edit Mode)Object To Spline EditorParticle EditorPerformance Profiler / Camera RecorderPhysics ReloaderPrefab Instance EditorEditor PreferencesRace / Path EditorRally EditorRaycast Test Editor ToolRenderer Components Editor ToolRender Test Editor ToolResource Checker Editor ToolRiver EditorRoad Architect EditorRoad DecorationsRoad Editor (Decal Road)Road Network ExporterRoad River Cache HandlerRoad River GUIRoad Spline EditorRoad Template EditorRoad UtilitiesScene TreeScene ViewScreenshot Creator BootstrapScript AI EditorScript AI ManagerSensor Configuration EditorSensor DebuggerShape EditorShortcut LegendSidewalk Spline EditorSites EditorSlot Traffic EditorSuspension Audio DebugTech Server ManagerTerraform ToolTerrain And Road ImporterTerrain EditorTerrain Materials EditorText EditorTool ManagerTool ShortcutsTraffic DebugTraffic ManagerTraffic Signals EditorUndo History ViewerVehicle Bridge TestVehicle Detail ViewerVehicle Editor MainEditor - VisualizationEditor Viz HelperEditor Water Object HelperEditor Windows Manager
Vehicle Editor - Toolbar
Adjustable Tech Car TunerAero DebugCrash TesterFlexbody DebugGeneral DataJBeam PickerVehicle Editor - Lights DebugVehicle Editor - Node Triangle Self Collision DetectorVehicle Editor - Powertrain InspectorVehicle Editor - Prop TransformerVehicle Editor - Raw Vehicle DataVehicle Editor - TCS DebugVehicle Editor - Vehicle SpawnerVehicle Editor - Scene View

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 ExtensionseditorvehicleEditorliveEditor

Vehicle Editor - Vehicle Spawner

Tool for spawning and despawning multiple vehicles at specified positions within the Vehicle Editor, with interactive location picking via raycast.

Tool for spawning and despawning multiple vehicles at specified positions within the Vehicle Editor, with interactive location picking via raycast.


Module Exports

ExportTypeDescription
M.menuEntrystring"Other/Vehicle Spawner" - menu label (nested)
M.openfunctionOpens the spawner window
M.onUpdatehookRenders ImGui window and picking overlay
M.onEditorInitializedhookPopulates vehicle list (up to 20 cars/trucks)
M.onSerializehookPersists window state
M.onDeserializedhookRestores window state

Key Internals

VariableTypePurpose
windowOpenBoolPtrWindow visibility
vehsListtableAvailable vehicle list (Car/Truck types, max 20)
pickingLocationbooleanWhether user is picking spawn location
startPosvec3/nilChosen spawn origin position
startYawnumberSpawn direction in degrees (default 90)
startDirquatSpawn direction as quaternion
vehsDatatableSpawned vehicle references and initial positions

How It Works

  1. On editor init, collects up to 20 Car/Truck type vehicles from core_vehicles.getVehicleList()
  2. "Spawn Vehicle" button opens a secondary selector window with vehicle buttons
  3. "Pick Start Location" enables terrain raycasting with mouse scroll for rotation
  4. Vehicles spawn in a line spaced 10m apart along the spawn direction
  5. "Despawn All" deletes all spawned vehicles

Lua Code Example

-- Open vehicle spawner
extensions.editor_vehicleEditor_liveEditor_veVehicleSpawner.open()

-- Vehicle list is populated on editor init:
-- for k, vehItem in ipairs(core_vehicles.getVehicleList().vehicles) do
--   if vehItem.model.Type == 'Car' or vehItem.model.Type == 'Truck' then
--     table.insert(vehsList, vehItem)
--   end
-- end

-- Location picking uses terrain raycast:
-- hit = cameraMouseRayCast(false, im.flags(SOTTerrain))
-- Vehicles preview as red triangles during picking

-- Rotation is adjusted via mouse wheel during picking:
-- tempStartYaw = tempStartYaw + io.MouseWheel * 5
-- tempStartDir = quatFromAxisAngle(vec3(0,0,1), math.rad(tempStartYaw))

-- Spawn positions are spaced 10m apart:
-- local spawnPos = startPos + startDir * vec3(10 * (i - 1), 0, 0)
-- local veh = core_vehicles.spawnNewVehicle(vehData.model.key, {pos = spawnPos, rot = startDir})
-- veh:queueLuaCommand("input.event('parkingbrake', 0, 1)")

-- Quick-spawn from selector window uses camera position:
-- local spawnPos = core_camera.getPosition()
-- local spawnRot = getCameraQuat()

-- Despawn removes all tracked vehicles:
-- for _, vehData in ipairs(vehsData) do
--   vehData.veh:delete()
-- end

See Also

  • Adjustable Tech Car Tuner - Related reference
  • Aero Debug - Related reference
  • Crash Tester - Related reference
  • World Editor Guide - Guide

Vehicle Editor - TCS Debug

Real-time Traction Control System (TCS) debugging tool that plots per-wheel brake factors, slip values, throttle factors, and slip thresholds as scrolling multi-line graphs.

Vehicle Editor - Scene View

Creates and manages multiple auxiliary scene views (render views) attached to the vehicle, supporting orthographic projections (left/right/front/back/top/bottom) and free 3D camera mode.

On this page

Module ExportsKey InternalsHow It WorksLua Code ExampleSee Also