RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Auto AnnotationBoosterCalibrate ESCCompile ImpostersCompile MeshesConfig List GeneratorDecal Roads EditorDependency TreeDoc CreatorVehicle ExporterFollow The White RabbitForest GeneratorGround Model DebugInput System UtilsInstanced Line Render DemoJBeam StatsLog StreamsMap TilesNode Beam ExportNode StreamPhotomodePrecompile ShadersPrecompile VehiclesProcedural Track GeneratorRectangle GeneratorRender Components APIResave MaterialsRich PresenceSave Dynamic DataScreenshot CreatorShowroomSort LinesStep HandlerTerrain GeneratorTest Extension ProxiesTest JSON Files SyntaxVehicle Rope DebugBatch WorkerWebSocket Test

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 Extensionsutil

Vehicle Rope Debug

Reference for `extensions/util/vehicleRopeDebug.lua`. Provides an ImGui debug sandbox for visualizing and editing rope physics parameters on the current vehicle.

Reference for extensions/util/vehicleRopeDebug.lua. Provides an ImGui debug sandbox for visualizing and editing rope physics parameters on the current vehicle.


Exports

KeySignatureDescription
onUpdate(dt)Main update loop: draws debug visualization and ImGui window

Internals

Debug Visualization

  • Strain-colored segments: Lines between rope nodes colored green→red based on stretch strain.
  • Node spheres: Sized by mass; colored by type (blue=anchor A, red=fixed B, green=free B, light blue=intermediate).
  • Direction arrows: Shows anchor direction vectors (magenta for A, cyan for B).
  • Mass labels: Optional per-node mass text display.

Node Interaction

  • Hover detection: Raycasts against node spheres (0.1m radius) to find hovered nodes.
  • Drag support: Click-drag nodes on XY plane at node's Z height. Updates rope anchor positions and intermediate node positions.

ImGui Window ("Rope Visual Sandbox")

Exposes all rope parameters for live editing:

  • Anchors: Base position (editable) and calculated position (read-only) for A and B, plus direction vectors.
  • Physics: Node count, length scale, diameter, damping, total mass, mass falloff, iterations, gravity (XYZ), Young's modulus.
  • Constraints: XPBD toggle, bending (stiffness + segment length), strain limit.
  • Environment: Wind scale, wind drag, simulation FPS.
  • Rendering: Material name, render toggle, debug visualization toggles.
  • Stats: Max/avg strain, current/rest length, sim time.

Performance Tracking

  • Tracks per-rope sim times over 60-frame history.
  • Computes average, max, and spike counts (>2x average).
  • Displays total sim/render time as percentage of frame budget.

How It Works

  1. Load via extensions.load('util_vehicleRopeDebug').
  2. Automatically finds ropes on the current player vehicle via be:getPlayerVehicle(0).ropeIds.
  3. Auto-selects first rope; UI parameters sync bidirectionally with the rope object.
  4. Changes to physics parameters (node count, etc.) trigger rope:rebuild().
  5. Debug drawing happens every frame via debugDrawer calls.
-- Load the debug UI
extensions.load('util_vehicleRopeDebug')
-- The ImGui window appears automatically with rope controls

Additional Exports

  • M.onUpdate - (undocumented)

See Also

  • Auto Annotation - Related reference
  • Booster - Related reference
  • Calibrate ESC - Related reference
  • Game Engine Overview - Guide

Test JSON Files Syntax

Validates the syntax of every JSON, JBeam, and PC file in the game by attempting to decode each.

Batch Worker

Reference for `extensions/util/worker.lua`. Processes batch work items from a JSON file (`/work.json`) for automated tasks like mesh compilation, imposter generation, mod testing, and vehicle previews

On this page

ExportsInternalsDebug VisualizationNode InteractionImGui Window ("Rope Visual Sandbox")Performance TrackingHow It WorksAdditional ExportsSee Also