RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Flowgraph Base ModuleFlowgraph Base NodeFlowgraph Base State NodeFlowgraph Node BuilderFlowgraph GraphFlowgraph Group HelperFlowgraph LinkFlowgraph ManagerNew Node TemplateFlowgraph PinFlowgraph States ManagerFlowgraph UtilsFlowgraph Variable Storage
Bool (Flowgraph Node)Color (Flowgraph Node)Generic Set/Get Variable (Flowgraph Node)Get Variable (Flowgraph Node)Number (Flowgraph Node)Quat (Flowgraph Node)Set Variable (Flowgraph Node)String (Flowgraph Node)Transform (Flowgraph Node)Vec3 (Flowgraph Node)

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 Extensionsflowgraphnodestypes

Transform (Flowgraph Node)

- **Node Name:** `Transform`

Overview

  • Node Name: Transform
  • Category: provider
  • File: extensions/flowgraph/nodes/types/transform.lua
  • Icon: d_rotation

Manages a position, rotation, and scale in 3D space. Supports interactive gizmo editing or reading transforms from a scene object by ID.

Pin Schema

Input Pins (when mode = fromID)

PinTypeDescription
objIDnumberScene object ID to read transform from

Output Pins

PinTypeDescription
posvec3Position of the transform
rotquatRotation of the transform
sclvec3Scale of the transform

Internals

FieldPurpose
self.positionvec3 - current position (defaults to 15m in front of camera)
self.rotationquat - current rotation (defaults to identity)
self.scalevec3 - current scale (defaults to 1,1,1)
self.mode'gizmo' or 'fromID' - input source
self.markerColorColorF - debug visualization color
self.displayModeOne of: default, sphereX/Y/Z, halfBox, fullBox, aproxVehicle

How It Works

  1. init() - Positions the transform 15m in front of the camera with identity rotation and unit scale.
  2. work():
    • Gizmo mode: Outputs the stored position/rotation/scale as tables.
    • fromID mode: Reads position, rotation, and scale from the scene object specified by objID.
  3. Gizmo integration - When properties are shown in the editor, integrates with BeamNG's axis gizmo for interactive translate/rotate/scale dragging.
  4. drawMiddle() - Draws debug visualization (axes, spheres, boxes) in the 3D viewport based on displayMode.
  5. drawCustom() - Editor UI for position/rotation/scale drag inputs, color picker, and helper buttons (move to camera, drop to terrain, copy from selection).

Display Modes

ModeDescription
defaultSmall sphere at position
sphereX/Y/ZSphere with radius from scale.x/y/z
halfBoxHalf-size oriented bounding box
fullBoxFull-size oriented bounding box
aproxVehicleApproximate vehicle-shaped box with direction indicator

Serialization

Saves position, rotation, scale, marker color, mode, display mode, and quaternion rotation preference.

Example Usage

-- In gizmo mode, drag the transform in the editor viewport.
-- Outputs are tables:
-- pos = {x, y, z}
-- rot = {x, y, z, w}
-- scl = {x, y, z}

-- In fromID mode, connect an object ID:
-- The node reads the object's transform each frame.
local obj = scenetree.findObjectById(objID)
local pos = vec3(obj:getPosition())

Additional Methods

C:_executionStarted()

Called when graph execution starts. Used for initialization/reset.

C:_executionStopped()

Called when graph execution stops. Used for cleanup.

C:_onDeserialized(nodeData)

Called after the node is deserialized (loaded from file). Restores runtime state from saved data.

Parameters:

  • nodeData

C:_onSerialize(res)

Called when the node is serialized (saved to file). Returns data to persist.

Parameters:

  • res

C:drawAxisBox(corner, x, y, z, clr)

Custom ImGui drawing function for the node editor.

Parameters:

  • corner
  • x
  • y
  • z
  • clr

C:drawCustomProperties()

Custom ImGui drawing for the node's properties panel in the editor.

C:gizmoBeginDrag()

Node method.

C:gizmoDragging()

Node method.

C:gizmoEndDrag()

Node method.

C:hideProperties()

Returns a set of property names to hide in the editor.

C:showProperties()

Returns a set of property names to show in the editor.

C:updateTransform()

Node method.


See Also

  • Bool (Flowgraph Node) - Related reference
  • Color (Flowgraph Node) - Related reference
  • Generic Set/Get Variable (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

String (Flowgraph Node)

- **Node Name:** `String`

Vec3 (Flowgraph Node)

- **Node Name:** `Vec3`

On this page

OverviewPin SchemaInput Pins (when mode = fromID)Output PinsInternalsHow It WorksDisplay ModesSerializationExample UsageAdditional MethodsC:_executionStarted()C:_executionStopped()C:_onDeserialized(nodeData)C:_onSerialize(res)C:drawAxisBox(corner, x, y, z, clr)C:drawCustomProperties()C:gizmoBeginDrag()C:gizmoDragging()C:gizmoEndDrag()C:hideProperties()C:showProperties()C:updateTransform()See Also