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
Collection Marker (Flowgraph Node)Custom Lua Command (Flowgraph Node)Get Object Field (Flowgraph Node)Get Player Vehicle ID (Flowgraph Node)Get Point on Decalroad (Flowgraph Node)Show/Hide Object (Flowgraph Node)ID by Name (Flowgraph Node)Keep Prefab (Flowgraph Node)Particle Emitter (Flowgraph Node)Point on Decalroad (Flowgraph Node)Raceline Parking (Flowgraph Node)Raycast (Flowgraph Node)Parking Markers / Rect Marker (Flowgraph Node)Reload Collision (Flowgraph Node)Reload Nav Graph (Flowgraph Node)Remove Prefab (Flowgraph Node)Reset Prefab (Flowgraph Node)Set Object Field (Flowgraph Node)Sevensegment Display (Flowgraph Node)Single Marker (Flowgraph Node)Spawn Light / SpotLight (Flowgraph Node)Spawn Prefab (Flowgraph Node)Spawn TSStatic (Flowgraph Node)Store Statics (Flowgraph Node)Track Prefab (Flowgraph Node)
Camera Transform (Flowgraph Node)Camera Look at Position (Flowgraph Node)Camera Auto Circle (Flowgraph Node)Simple Cam Path (Flowgraph Node)Get Camera FOV (Flowgraph Node)Get Camera Mode (Flowgraph Node)Get Cam Path (Flowgraph Node)Restart Cam Path (Flowgraph Node)Return Camera to Vehicle (Flowgraph Node)Set Camera FOV (Flowgraph Node)Set Camera Mode (Flowgraph Node)Set Camera Position (Flowgraph Node)Set Camera Rotation (Flowgraph Node)Start Cam Path (Flowgraph Node)Stop Cam Path (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 Extensionsflowgraphnodesscenecamera

Set Camera Position (Flowgraph Node)

- **Node Name:** `Set Camera Position`

Overview

  • Node Name: Set Camera Position
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/scene/camera/setCameraPosition.lua

Sets the free camera's position in world space. Supports two modes: a hardcoded custom position or a dynamic position from an input pin. Preserves current camera rotation.

Pin Schema

Output Pins

PinTypeDescription
valuevec3The position that was set

Dynamic Input Pins (mode-dependent)

PinTypeDescription
posvec3Position from pin (only in "from Pin" mode)

Behavior

  • work() - Each frame:
    1. Switches to free camera if needed.
    2. Reads position from the input pin (if mode is "from Pin") or uses the stored custom position.
    3. Calls SetCamera() which uses core_camera.setPosRot() with the new position and the current rotation quaternion.
    4. Outputs the applied position.
  • drawCustomProperties() - Editor UI with:
    • Mode dropdown: custom or from Pin
    • Position drag fields (in custom mode)
    • "Set from camera" button to capture current camera position
    • "Preview" button to apply the position
  • Serialization - Saves/restores position and mode through _onSerialize/_onDeserialized.

Internals

  • self.position - vec3 storing the target position
  • self.mode - 'custom' or 'from Pin'
  • SetCamera() - Applies position while preserving rotation via core_camera.getQuat()

Key Dependencies

  • commands.isFreeCamera() / commands.setFreeCamera() - Free camera management
  • core_camera.setPosRot(player, x, y, z, qx, qy, qz, qw) - Sets camera transform
  • core_camera.getQuat() - Gets current camera rotation
  • core_camera.getPosition() - Gets current camera position (for editor capture)

How It Works

The node offers flexibility through two modes. In custom mode, the position is hardcoded in the node's properties and editable in the flowgraph editor. In from Pin mode, it dynamically creates an input pin to receive position data from other nodes. Both modes preserve the existing camera rotation when updating position.

Example Usage

-- Static camera: use custom mode, set position in editor, wire into scene
-- Dynamic camera: use from Pin mode, wire a vec3 from scene objects
-- Combine with Set Camera Rotation for full camera control

Additional Methods

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.


See Also

  • Camera Transform (Flowgraph Node) - Related reference
  • Camera Look at Position (Flowgraph Node) - Related reference
  • Camera Auto Circle (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Set Camera Mode (Flowgraph Node)

- **Node Name:** `Set Camera Mode`

Set Camera Rotation (Flowgraph Node)

- **Node Name:** `Set Camera Rotation`

On this page

OverviewPin SchemaOutput PinsDynamic Input Pins (mode-dependent)BehaviorInternalsKey DependenciesHow It WorksExample UsageAdditional MethodsC:drawMiddle(builder, style)C:init()See Also