RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

AI Module ReferenceBackwards Compatibility Module ReferenceBdebug Module ReferenceBdebugImpl Module ReferenceBeamstate Module ReferenceBullettime Module ReferenceController Module ReferenceDamageTracker Module ReferenceDrivetrain Module ReferenceElectrics Module ReferenceElectrics Custom Value ParserEnergyStorage Module ReferenceExtensions Module ReferenceFire Module ReferenceVehicle Engine True GlobalsGuihooks Module ReferenceGUI Streams Module ReferenceHTML Texture Module ReferenceHydros Module ReferenceInput Module ReferenceJBeam-Lua Integration GuideMapmgr Module ReferenceMaterial Module ReferenceBeamNG Math & Unit Conversions Referenceobj (Vehicle C++ Object)PartCondition Module ReferenceParticlefilter Module ReferenceParticles Module ReferencePowertrain Module ReferenceVehicle Property & Module TreeProps Module ReferenceProtocols Module ReferenceRecovery Module ReferenceScriptAI Module ReferenceSensors Module ReferenceSounds Module ReferenceStreams Module ReferenceThrusters Module Reference`v` (Vehicle Data & JBeam)Wheels Module Reference
4WD / Transfer Case ControllerAdvanced Coupler ControlAirplane Control SurfacesAxle Lift ControllerBeacon Spin ControllerBeam NavigatorBypass Dampers ControllerController TemplateControl ModesDrag TimerDrive ModesDummy ControllerElectronic Stability Control (ESC)ETK Gauges ControllerVehicle Controllers OverviewHydraulic Suspension ControllerInput/Output Demo ControllerJATO (Jet Assisted Take-Off)Lightbar ControllerLine LockLogger TemplateNitrous Oxide InjectionPlayer ControllerPneumatics System ControllerPower Steering ControllerPyrotechnic Charge ControllerSBR Gauges ControllerShift Lights ControllerTire Pressure ControlTrailer Landing Feet ControllerTwo-Step Launch ControlVivace Gauges ControllerWendover Gauges Controller
Control Management Unit (CMU)

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 ReferencevecontrollerdrivingDynamics

Control Management Unit (CMU)

The central hub for advanced driving dynamics. The CMU orchestrates all sensors, actuators, and supervisors that make up the vehicle's electronic stability and traction management systems. It initializes sub-controllers, manages calibration routines, and provides debug output via UDP.

The central hub for advanced driving dynamics. The CMU orchestrates all sensors, actuators, and supervisors that make up the vehicle's electronic stability and traction management systems. It initializes sub-controllers, manages calibration routines, and provides debug output via UDP.


State Fields

FieldTypeDescription
sensorHub, vehicleData, virtualSensorstableReferences to the primary data structures containing physical and calculated vehicle state.
warningLightPulsenumberOscillating value used for pulsing dashboard warning lights.

Public API

FunctionDescription
new(jbeamData)Initializes the CMU and its sub-controllers (sensors and supervisors).
registerCalibrationCallback(callback, callbackType)Allows external modules to hook into the CMU's update loops during calibration.
disableSystemsForCalibration()Temporarily disables all driving dynamics supervisors (TCS, ESC, etc.).
getSupervisors()Returns a list of all active driving dynamics supervisor modules.
module.getSensor(sensorName)Returns the sensor.
module.getSensors()Returns the sensors.
module.getActuator(actuatorName)Returns the actuator.
module.getActuators()Returns the actuators.
module.setDebugMode(debugEnabled)Sets the debug mode.
module.setParameters(parameters)Sets the parameters.
module.setConfig(configTable)Sets the config.
module.getConfig()Returns the config.

Hooks

HookDescription
updateGFX(dt)Manages UDP debug heartbeats and updates warning light oscillations.
module.init(jbeamData)Initializes the controller from JBeam data.
module.initSecondStage()Second-stage initialization after all controllers are loaded.
module.reset(jbeamData)Resets the controller to its initial state.
module.initLastStage()Final-stage initialization after all controllers and powertrains are ready.

Usage Example

-- Access CMU sensors
local cmu = controller.getController("CMU")
local sensors = cmu.getSensors()

-- Get a specific sensor
local sensorHub = cmu.getSensor("sensorHub")

-- Disable dynamics systems for calibration
cmu.disableSystemsForCalibration()

See Also

  • Sensor Hub — Central sensor data aggregation
  • Vehicle Data — Processed vehicle state
  • Traction Control — TCS supervisor
  • Yaw Control — ESC/yaw supervisor

Kingpin Coupling

Controls the kingpin assembly on the trailer side of a fifth-wheel coupling. Manages the coupling interface that mates with the tractor's fifth wheel plate.

Active Center Differential Lock

Electronically controlled center differential lock actuator. Varies the lock percentage of the center differential based on commands from the driving dynamics supervisors, controlling front-to-rear torque distribution.

On this page

State FieldsPublic APIHooksUsage ExampleSee Also