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

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 Extensionseditor

Map Sensor Editor

Editor tool for placing and configuring map-attached sensors (Camera, LiDAR, Ultrasonic, RADAR). Requires `Research` build flag. Provides full ImGui UI for sensor management, live/edit mode toggling,

Editor tool for placing and configuring map-attached sensors (Camera, LiDAR, Ultrasonic, RADAR). Requires Research build flag. Provides full ImGui UI for sensor management, live/edit mode toggling, Python code export, and gizmo-based pose adjustment.


Public API

FunctionSignatureDescription
M.onEditorGui()Main editor GUI callback; renders tool, sensor properties, and camera preview windows
M.onEditorInitialized()Registers editor windows and edit mode
M.onSerialize() → tableSerializes sensor configuration
M.onDeserialized(dataIn)Restores sensor configuration from serialized data
M.onSensorCreated(sensorType, sensorId)Hook called when a sensor is created
M.onSensorRemoved(sensorType, sensorId)Hook called when a sensor is removed

Internal Functions

FunctionDescription
gizmoBeginDrag()Captures rotation state at start of axis gizmo drag
gizmoDragging()Handles translation/rotation during gizmo drag
handleGimbals(pos)Sets up and draws the axis gizmo for sensor pose adjustment
handleFinishPlacingSensor(pos)Creates a new sensor at the given world position
handleEditLiveModeSwitch(idx)Toggles a sensor between edit and live streaming mode
handlePlaceSensor()Raycasts to terrain and places sensor on mouse click
removeSensor(idx)Removes a sensor and cleans up its live state
saveConfiguration()Saves sensor config to JSON via file dialog
loadConfiguration()Loads sensor config from JSON via file dialog
manageMainToolWindow()Renders the main sensor list with add/remove/edit/live buttons
manageCameraPreviewWindow(dt)Renders live camera preview for selected camera sensor
manageSensorPropWindow()Renders per-sensor property editor (position, resolution, FOV, etc.)

Key Concepts

  • Sensor Types: Camera, LiDAR, Ultrasonic, RADAR - each with dedicated property UI
  • Edit vs Live Mode: Sensors can be toggled between editable (gizmo) and streaming (live data)
  • Python Export: Generates BeamNGpy-compatible Python code for the current configuration
  • Beam Presets: Ultrasonic and RADAR sensors have beam shape presets (triangular, bulb, spherical, etc.)

Usage Example

-- This is an editor extension; activate via the editor toolbar
-- Sensors are placed by clicking "Add Camera/LiDAR/Ultrasonic/RADAR"
-- then clicking on the terrain to position them.
-- Configurations are saved/loaded as JSON files.

Dependencies

  • editor/tech/sensorConfiguration/utilities
  • editor/tech/sensorConfiguration/conversions
  • tech/techUtils
  • extensions.tech_sensors
  • extensions.tech_pythonExport
  • extensions.tech_cameraPreview

Functions

onSerialize()

Callback for serialize event.

Returns: table

onDeserialized(dataIn)

Callback for deserialized event.

  • dataIn (any)

onSensorCreated(sensorType, sensorId)

Callback for sensor created event.

  • sensorType (any)
  • sensorId (any)

onSensorRemoved(sensorType, sensorId)

Callback for sensor removed event.

  • sensorType (any)
  • sensorId (any)

Returns: self


See Also

  • Editor AI Tests - Related reference
  • Editor AI Visualization - Related reference
  • Editor – Assembly Spline Tool - Related reference
  • World Editor Guide - Guide

Editor Main Update

Core per-frame update loop for the editor. Drives edit mode updates, object icon rendering, preference broadcasting, gizmo rendering, GUI presentation, and collision rebuild checks.

Master Spline Editor

Main editor tool for the Master Spline system - a parametric road/spline editor with multi-layer linking (mesh, assembly, decal, road splines), auto banking, terrain conforming, road design homologati

On this page

Public APIInternal FunctionsKey ConceptsUsage ExampleDependenciesFunctionsonSerialize()onDeserialized(dataIn)onSensorCreated(sensorType, sensorId)onSensorRemoved(sensorType, sensorId)See Also