RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
ui/ambientSound - Ambient Sound Stream PlayerUI Apps ManagerUI AudioBindings LegendCamera Distance AppConsole (consoleNG)Credits MusicExternal App (WebSocket UI Server)Fade ScreenGame BlurGameplay App ContainersGrid SelectorLivery EditorMessages DebuggerMessages/Tasks App ContainersMission InfoPolice InfoTop BarUI ModsUI Navigation / MapVehicle Paint EditorVehicle Vicinity AppUI Visibility
Livery Editor - CameraLivery Editor - ControlsLivery Editor - Edit ModeLivery Editor – Editor (Core)Livery Editor – HistoryLivery Editor – Layer ActionLivery Editor – Layer EditLivery Editor – LayersLivery Editor – ResourcesLivery Editor – SelectionLivery Editor – ToolsLivery Editor – User DataLivery Editor – Utils
Livery Editor – Tools / GroupLivery Editor – Tools / MaterialLivery Editor – Tools / MiscLivery Editor – Tools / SettingsLivery Editor – Tools / Transform

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 ExtensionsuiliveryEditortools

Livery Editor – Tools / Transform

Transform tool - translate, rotate, scale, skew, and stamp operations for cursor and decal layers.

Transform tool - translate, rotate, scale, skew, and stamp operations for cursor and decal layers.


Overview

ui_liveryEditor_tools_transform is the primary spatial editing tool. It provides translate, rotate, scale, skew, and stamp operations, dispatching to the appropriate handler (cursor, decal, or group) via doOperation.

Extension path: lua/ge/extensions/ui/liveryEditor/tools/transform.lua


Exports (M)

FunctionSignatureDescription
useStamp()Enters stamp mode - matches cursor to selected layer, hides layer, enables mouse projection.
cancelStamp()Cancels stamp mode - restores layer visibility, returns to cursor projection.
translate(steps_x, steps_y)Translates cursor by step increments.
setPosition(posX, posY)Sets cursor position absolutely.
rotate(degrees, counterClockwise)Rotates cursor or decal layer by degrees.
setRotation(degrees)Sets absolute rotation on cursor or decal layer.
scale(steps_x, steps_y)Scales cursor or decal layer by steps.
setScale(scaleX, scaleY)Sets absolute scale on cursor or decal layer.
skew(steps_x, steps_y)Skews cursor or decal layer by steps.
setSkew(skewX, skewY)Sets absolute skew on cursor or decal layer.

Internals

Stamp Mode

Stamp mode lets the user reposition a placed decal by projecting it through the cursor:

M.useStamp = function()
  local layer = api.getLayerByUid(layerUid)
  -- Copy layer properties to cursor
  api.setDecalRotation(layer.decalRotation)
  api.setDecalScale(layer.decalScale)
  api.setDecalSkew(layer.decalSkew)
  api.setDecalColor(layer.color)
  -- Hide layer (alpha=0), show cursor, enable mouse
  layer.color = Point4F(layer.color.x, layer.color.y, layer.color.z, 0)
  api.setLayer(layer, true)
end

Type-Based Dispatch

Each transform function routes by layer type:

LayerHandler
nil (cursor)ui_liveryEditor_layers_cursor
decalui_liveryEditor_layers_decals
groupLogged as "not implemented yet"

Step Units (internal reference)

TRANSLATE_STEP_UNIT = 0.1
ROTATE_STEP_UNIT    = 1
SCALE_STEP_UNIT     = 0.1
SKEW_STEP_UNIT      = 0.1

Note: These are larger than the cursor/layerEdit step units (designed for the tool slider UI).


How It Works

  1. The transform tool is activated via ui_liveryEditor_tools.useTool("transform")
  2. Operations dispatch through doOperation to cursor or layer handlers
  3. Stamp mode copies layer properties to the cursor for visual repositioning
  4. cancelStamp restores the original layer; confirming stamps via editor module
  5. Group transforms are stubbed but not yet implemented

Example Usage

local transform = extensions.ui_liveryEditor_tools_transform

-- Enter stamp mode for the selected layer
transform.useStamp()

-- Rotate the active target by 15 degrees clockwise
transform.rotate(15, false)

-- Set absolute scale
transform.setScale(0.5, 0.5)

-- Cancel stamp
transform.cancelStamp()

Additional Exports

The following exports are available but not yet documented in detail:

  • M.cancelStamp
  • M.rotate
  • M.scale
  • M.setPosition
  • M.setRotation
  • M.setScale
  • M.setSkew
  • M.skew
  • M.translate

Livery Editor – Tools / Settings

Provides layer management tool operations for the livery editor.

Top Bar Config

Static configuration of top bar navigation entries and their flags.

On this page

OverviewExports (M)InternalsStamp ModeType-Based DispatchStep Units (internal reference)How It WorksExample UsageAdditional Exports