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
Play Replay (Flowgraph Node)Record Camera (Flowgraph Node)Record Replay (Flowgraph Node)Start Auto Replay (Flowgraph Node)Stop Auto Replay (Flowgraph Node)Stop Replay (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 Extensionsflowgraphnodesrecording

Record Camera (Flowgraph Node)

- **Node Name:** `Record Camera`

Overview

  • Node Name: Record Camera
  • Category: repeat_f_duration
  • File: extensions/flowgraph/nodes/recording/recordCamera.lua

Records a camera path using keyframes. Each snap impulse captures a position/rotation keyframe with a timestamp. When stopped, creates a SimPath with Marker objects in the scene.

Pin Schema

Input Pins

PinTypeDescription
snapflow (impulse)Capture a keyframe at the current position/rotation
stopflow (impulse)Stop recording and save the path
posvec3Position for the keyframe
rotquatRotation for the keyframe
prefixstringPrefix for the generated SimPath object name

Output Pins

PinTypeDescription
filenamestringThe generated SimPath object name

Internals

  • self.path - array of {time, pos, rot} keyframe entries.
  • self.startTime - os.clock() at execution start, used to compute relative timestamps.
  • self.durationState - 'inactive' → 'started' → 'finished'.

finishUp()

Creates a SimPath object, iterates over recorded keyframes, and creates Marker child objects with:

  • Position and rotation from keyframe data.
  • timeToNext computed as the delta between consecutive keyframe timestamps.
  • Adds to scenetree.MissionGroup.

How It Works

  1. Starts in inactive state. First snap impulse transitions to started.
  2. While started, each snap impulse appends {time, pos, rot} to self.path.
  3. When stop fires, transitions to finished and calls finishUp().
  4. The drawMiddle callback displays the current state and keyframe count in the editor.

Lua Code Example

-- Record a camera flythrough:
-- cameraTransform.pos → recordCamera.pos
-- cameraTransform.rot → recordCamera.rot
-- keyPress("F5") → recordCamera.snap
-- keyPress("F6") → recordCamera.stop
-- recordCamera.filename → can be used with cameraPath node

Key Dependencies

  • createObject("SimPath") / createObject("Marker") - scene object creation
  • scenetree.MissionGroup - parent for the created path
  • os.clock() - keyframe timing

Additional Methods

C:_executionStarted()

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

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

  • Play Replay (Flowgraph Node) - Related reference
  • Record Replay (Flowgraph Node) - Related reference
  • Start Auto Replay (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Play Replay (Flowgraph Node)

- **Node Name:** `Play Replay`

Record Replay (Flowgraph Node)

- **Node Name:** `Record Replay`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsfinishUp()How It WorksLua Code ExampleKey DependenciesAdditional MethodsC:_executionStarted()C:init()C:work()See Also