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

Quat (Flowgraph Node)

- **Node Name:** `Quat`

Overview

  • Node Name: Quat
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/types/quat.lua

Constructs a quaternion from four numeric components (x, y, z, w) and outputs it as a quat value.

Pin Schema

Input Pins

PinTypeDescription
xnumberThe x component
ynumberThe y component
znumberThe z component
wnumberThe w component

Output Pins

PinTypeDescription
valuequatThe quaternion value (as {x, y, z, w} table)

How It Works

  1. work() - Reads x/y/z/w from input pins (defaulting to 0), constructs a quat, and outputs it as a 4-element table {x, y, z, w}.
  2. drawMiddle() - Shows the quaternion string representation inline on the node.

Internals

  • Uses a module-level quatOut to avoid per-frame allocation.
  • Output is a plain table {x, y, z, w}, not a quat userdata - this is the standard flowgraph wire format for quaternions.

Example Usage

-- Construct identity quaternion
-- x=0, y=0, z=0, w=1
-- Output: {0, 0, 0, 1}

-- The node is equivalent to:
local q = quat(x, y, z, w)
self.pinOut.value.value = {q.x, q.y, q.z, q.w}

Additional Methods

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:drawProperties()

Custom ImGui drawing function for the node editor.


See Also

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

Number (Flowgraph Node)

- **Node Name:** `Number`

Set Variable (Flowgraph Node)

- **Node Name:** `Set Variable`

On this page

OverviewPin SchemaInput PinsOutput PinsHow It WorksInternalsExample UsageAdditional MethodsC:_onDeserialized(nodeData)C:_onSerialize(res)C:drawProperties()See Also