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
Drive Path Editor - PlaybackDrive Path Editor - RecordDrive Path Editor - Spline 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 ExtensionseditordrivePathEditor

Drive Path Editor - Record

Records a vehicle's driven path into a new drive path spline. Samples position and velocity at a fixed interval, deduplicates close nodes, applies RDP simplification, and links the result to the recor

Records a vehicle's driven path into a new drive path spline. Samples position and velocity at a fixed interval, deduplicates close nodes, applies RDP simplification, and links the result to the recording vehicle.


Public API

FunctionSignatureDescription
M.getRecordingTime() → numberReturns total elapsed recording time in seconds
M.handleRecord()Per-frame update: samples vehicle position/velocity at recording frequency
M.startRecord(vehicle)Begins recording: enters vehicle, clears buffers, records initial point
M.stopRecord(sceneVehicles)Ends recording: creates spline, deduplicates, simplifies, links vehicle

Recording Constants

ConstantValueDescription
recordingFreq1.0sSampling interval
rdpTol3.0RDP simplification tolerance
defaultWidth10.0mDefault spline width
defaultVelLimit100.0 m/sDefault velocity limit per node
minVelocity3.0 m/sMinimum recorded velocity
closeTolSq4.1 m²Squared distance threshold for deduplication

Recording Flow

startRecord(vehicle)
  → be:enterVehicle(0, vehicle.veh)
  → Record initial position + velocity
  → Reset timers

handleRecord() (called each frame)
  → Accumulate dt
  → Every recordingFreq seconds:
      → Sample position and velocity
      → Append to buffers

stopRecord(sceneVehicles)
  → Create new drive path spline named "Recorded_<vehicleName>"
  → Copy recorded nodes/velocities
  → Remove duplicates within closeTolSq
  → RDP simplify with rdpTol
  → Set default widths, normals, velocity limits
  → Link spline to recording vehicle

Usage Example

local record = require('editor/drivePathEditor/record')

-- Start recording selected vehicle
record.startRecord(sceneVehicles[selectedIdx])

-- Each frame during recording:
record.handleRecord()

-- Stop and create spline:
record.stopRecord(sceneVehicles)
-- New spline is now in splineMgr.getDrivePathSplines()

Dependencies

ModulePurpose
editor/drivePathEditor/splineMgraddNewDrivePathSpline(), spline data access
editor/toolUtilities/rdpsimplifyNodesVels() for path simplification

See Also

  • Drive Path Editor - Playback - Related reference
  • Drive Path Editor - Spline Manager - Related reference
  • World Editor Guide - Guide

Drive Path Editor - Playback

Handles AI playback of all linked drive path splines/vehicles. Starts vehicles at their spline's starting node, waits for each spline's delay time, then commands AI driving via `ai.driveUsingPath` in

Drive Path Editor - Spline Manager

Core data manager for drive path splines. Handles creation, deletion, splitting, joining, flipping, deep copying, serialization/deserialization, vehicle linking, nav graph caching, and geometry update

On this page

Public APIRecording ConstantsRecording FlowUsage ExampleDependenciesSee Also