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
Accumulator (Flowgraph Node)Ease (Flowgraph Node)Increaser (Flowgraph Node)Expression (Flowgraph Node)
Linear Smoother (Flowgraph Node)Nonlinear Smoother (Flowgraph Node)Sigmoid Smoother (Flowgraph Node)Spring Smoother (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 Extensionsflowgraphnodesmathsmoothers

Linear Smoother (Flowgraph Node)

- **Node Name:** `Linear Smoother`

Overview

  • Node Name: Linear Smoother
  • Category: simple
  • File: extensions/flowgraph/nodes/math/smoothers/linear.lua

Provides linear temporal smoothing for a numeric signal with configurable up/down rates.

Pin Schema

Input Pins

PinTypeDescription
valuenumberThe target signal value
dtnumberDelta time for smoothing
upRatenumberSmoothing rate when value is increasing
downRatenumberSmoothing rate when value is decreasing
setnumberDirectly set the smoother's internal state

Output Pins

PinTypeDescription
valuenumberThe smoothed output value

Internals

FieldPurpose
self.smootherTemporalSmoothing object created on execution start
self.oldSetTracks previous set value to detect changes

How It Works

  1. On execution start, a newTemporalSmoothing() object is created.
  2. If the set pin changes, the smoother's internal state is directly set to that value.
  3. If no value input is provided, the current smoother state is output unchanged.
  4. Otherwise, the rate is selected based on direction (increasing → upRate, decreasing → downRate, default 1).
  5. The smoother is updated via getWithRateUncapped(sample, dt, rate) - linear interpolation without capping.

Lua Example

-- Smooth a throttle input:
-- value = raw throttle (0-1)
-- dt = frame delta time
-- upRate = 2 (fast response up)
-- downRate = 5 (slower release)
-- Output: smoothed throttle value

Key Dependencies

  • newTemporalSmoothing() - BeamNG temporal smoothing primitive
  • ui_imgui - displays smoother state in the node editor
  • _flowgraph_createNode() - standard flowgraph node registration

Additional Methods

C:_executionStarted()

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

C:checkSetValue()

Node method.

C:drawMiddle(builder, style)

Custom ImGui drawing in the middle section of the node in the editor.

Parameters:

  • builder
  • style

C:init()

Initializes the node, setting up pins and default properties.

C:work()

Main work function called each frame/tick when the node is active.


See Also

  • Nonlinear Smoother (Flowgraph Node) - Related reference
  • Sigmoid Smoother (Flowgraph Node) - Related reference
  • Spring Smoother (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Look At (Flowgraph Node)

- **Node Name:** `Look At`

Nonlinear Smoother (Flowgraph Node)

- **Node Name:** `Nonlinear Smoother`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsHow It WorksLua ExampleKey DependenciesAdditional MethodsC:_executionStarted()C:checkSetValue()C:drawMiddle(builder, style)C:init()C:work()See Also