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

Spring Smoother (Flowgraph Node)

- **Node Name:** `Spring Smoother`

Overview

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

Provides spring-damper temporal smoothing for a numeric signal, with separate spring/damp parameters for increasing and decreasing directions.

Pin Schema

Input Pins

PinTypeDescription
valuenumberThe target signal value
dtnumberDelta time for smoothing
upSpringnumberSpring stiffness when value is increasing
downSpringnumberSpring stiffness when value is decreasing
upDampnumberDamping when value is increasing
downDampnumberDamping when value is decreasing
setnumberDirectly set the smoother's internal state

Output Pins

PinTypeDescription
valuenumberThe smoothed output value

Internals

FieldPurpose
C.smootherSmoothing object (uses newTemporalSigmoidSmoothing internally)
C.oldSetTracks previous set value to detect changes

How It Works

  1. On init, a smoothing object is created (note: uses newTemporalSigmoidSmoothing which supports spring-damp via getWithSpringDamp).
  2. If the set pin changes, the smoother state is directly set.
  3. If no value is provided, the current state is output.
  4. Otherwise, spring and damp parameters are selected based on direction.
  5. The smoother uses getWithSpringDamp(sample, dt, spring, damp) - physics-based spring-damper smoothing that can overshoot.

Spring smoothing produces natural-feeling motion with potential oscillation, unlike the other smoothers which are monotonic.

Lua Example

-- Bouncy camera follow height:
-- value = target height
-- dt = frame delta time
-- upSpring = 10, upDamp = 0.5 (bouncy upward)
-- downSpring = 8, downDamp = 0.8 (less bouncy downward)

Key Dependencies

  • newTemporalSigmoidSmoothing() - used for its getWithSpringDamp() method
  • ui_imgui - displays smoother state in the node editor
  • _flowgraph_createNode() - standard flowgraph node registration

Additional Methods

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

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


See Also

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

Sigmoid Smoother (Flowgraph Node)

- **Node Name:** `Sigmoid Smoother`

Merge (Flowgraph Node)

- **Node Name:** `Merge`

On this page

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