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
Rally Editor - Driveline TabRally Editor - Measurements TabRally Editor – Mission Settings TabRally Editor – Notebook Info TabRally Editor – Pacenotes TabRally Editor – Recce TabRally Editor – System Pacenotes TabRally Editor – Test Tab

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 ExtensionseditorrallyEditor

Rally Editor - Measurements Tab

Sub-module for measuring distances along the stage snaproad with persistent, auto-saving measurement groups.

Sub-module for measuring distances along the stage snaproad with persistent, auto-saving measurement groups.


Overview

Provides tools for placing measurement points along the rally stage snaproad and calculating distances between them. Supports both direct (straight-line) and route-following distance modes. Measurements auto-save to a JSON file and support interactive point placement, dragging, and reordering.


Class Methods

MethodSignatureDescription
C:init(rallyEditor)Initializes measurement state
C:setPath(path)Sets the notebook path
C:selected()Loads snaproad from pacenotes window, auto-loads measurements
C:unselect()Tab deactivation hook
C:draw(mouseInfo, dtReal, dtSim, dtRaw)Renders UI and handles input
C:drawDebugEntrypoint()3D rendering: snaproad, points, lines, labels
C:handleMouseInput()Click=add/select points, Drag=move points along route
C:createMeasurement(name)Creates new measurement with random color
C:deleteMeasurement(id)Removes a measurement
C:addPointToMeasurement(id, point)Adds a point to a measurement
C:removePointFromMeasurement(id, pointIndex)Removes a point
C:movePointUp / C:movePointDown(id, index)Reorders points
C:calculateMeasurementDistance(id)Calculates total distance (route or direct)
C:saveMeasurements / C:loadMeasurements()JSON persistence to measurements.json
C:findNearestPoint(mousePos)Finds closest point across all measurements

Measurement Properties

PropertyTypeDescription
namestringDisplay name
pointsvec3[]Ordered list of measurement positions
totalDistancefloatCalculated distance (meters)
followRouteboolFollow snaproad vs straight-line distance
colorfloat[3]RGB display color (random vibrant HSV)
textColorfloat[3]Label text color (auto black/white based on luminance)

Distance Calculation

ModeDescription
Follow RouteMeasures along snaproad segments between points, accounting for continuous positioning via xnormOnLine
DirectStraight-line Euclidean distance between consecutive points

Visual Elements

ElementDescription
Colored spheresMeasurement points (pulsating when selected)
Intersection planesDirection indicators at each point
Prism linesConnections between points (route-following or direct)
LabelsMeasurement name + distance at first and last points
Hover indicatorWhite sphere showing where new point would be placed

Notes

  • Points snap to the snaproad when within 5m threshold.
  • Dragging uses XY delta with projection onto closest road segment.
  • Auto-saves on every modification (create, delete, add/remove point, drag, reorder).
  • Color picker with auto text color (black for bright colors, white for dark).
  • File path: <missionDir>/measurements.json.

Module Variables

  • windowDescription (string) - Module variable.

Functions

getMeasurementsFilePath()

Returns the measurements file path.

Returns: boolean - false

serialize()

Serializes data for persistence.

Returns: boolean - false

deserialize(data)

Deserializes data from persistence.

  • data (table)

Returns: boolean - true

setSnaproad(snaproad)

Sets the snaproad.

  • snaproad (any)

Returns: end

drawMeasurementPoints()

Draws measurement points.

getMeasurement(measurementId)

Returns the measurement.

  • measurementId (any)

Returns: self.measurements[measurementId]

updateMeasurement(measurementId, name)

Updates measurement.

  • measurementId (any)
  • name (string)

Returns: number - 0

selectMeasurement(measurementId)

Selects measurement.

  • measurementId (any)

Returns: number - 0

Module Variables

  • windowDescription (string) - Module variable.

Functions

getMeasurementsFilePath()

Returns the measurements file path.

Returns: boolean - false

serialize()

Serializes data for persistence.

Returns: boolean - false

deserialize(data)

Deserializes data from persistence.

  • data (table)

Returns: boolean - true

setSnaproad(snaproad)

Sets the snaproad.

  • snaproad (any)

Returns: end

drawMeasurementPoints()

Draws measurement points.

getMeasurement(measurementId)

Returns the measurement.

  • measurementId (any)

Returns: self.measurements[measurementId]

updateMeasurement(measurementId, name)

Updates measurement.

  • measurementId (any)
  • name (string)

Returns: number - 0

selectMeasurement(measurementId)

Selects measurement.

  • measurementId (any)

Returns: number - 0


See Also

  • Rally Editor - Driveline Tab - Related reference
  • Rally Editor – Mission Settings Tab - Related reference
  • Rally Editor – Notebook Info Tab - Related reference
  • World Editor Guide - Guide

Rally Editor - Driveline Tab

Sub-module for editing the stage driveline - an editable spline that defines the driving path through a rally stage.

Rally Editor – Mission Settings Tab

Editor tab for configuring rally mission settings: notebook selection, codriver assignment, and recce corner-call style preferences.

On this page

OverviewClass MethodsMeasurement PropertiesDistance CalculationVisual ElementsNotesModule VariablesFunctionsgetMeasurementsFilePath()serialize()deserialize(data)setSnaproad(snaproad)drawMeasurementPoints()getMeasurement(measurementId)updateMeasurement(measurementId, name)selectMeasurement(measurementId)Module VariablesFunctionsgetMeasurementsFilePath()serialize()deserialize(data)setSnaproad(snaproad)drawMeasurementPoints()getMeasurement(measurementId)updateMeasurement(measurementId, name)selectMeasurement(measurementId)See Also