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)

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 Extensionsflowgraphnodesscene

Get Point on Decalroad (Flowgraph Node)

- **Node Name:** `Get Point on Decalroad`

Overview

  • Node Name: Get Point on Decalroad
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/scene/getPointOnDecalroad.lua

Returns the position and approximate forward rotation of a specific control point on a DecalRoad object.

Pin Schema

Input Pins

PinTypeDescription
roadIdnumberID of the DecalRoad object
idxnumberIndex of the point on the road

Output Pins

PinTypeDescription
posvec3World position of the point
rotquatApproximate forward-facing rotation at the point

Behavior

  • _executionStarted() - Resets cached road object and index.
  • work() - Each frame:
    1. If roadId changed, looks up the road via scenetree.findObjectById(), caches it, reads node count and looped status.
    2. If idx changed and is within bounds (0 to nodeCount-1):
      • Gets the node position via roadObj:getNodePosition(idx).
      • Computes an approximate forward direction by getting prev and next nodes (wrapping for looped roads).
      • Builds a quaternion from the forward direction using quatFromDir(forward, up).
    3. Caches results to avoid redundant lookups.

Internals

  • self.roadObj - Cached DecalRoad scene object
  • self.oldRoadId / self.oldIdx - Change detection for caching
  • self.maxIdx - Maximum valid node index
  • self.looped - Whether the road loops (from the looped field)

Key Dependencies

  • scenetree.findObjectById(id) - Finds the road object
  • roadObj:getNodeCount() - Number of control points
  • roadObj:getNodePosition(idx) - Position of a control point
  • roadObj:getField("looped", 0) - Whether the road is looped
  • quatFromDir(forward, up) - Quaternion from direction vector

How It Works

The node provides access to DecalRoad control points - useful for placing objects along roads, creating waypoint sequences, or aligning cameras with road direction. The rotation is approximated by computing the direction between the previous and next control points, giving a tangent-like orientation. Looped roads wrap indices correctly.

Example Usage

-- Iterate through road points to place markers
-- Wire roadId from an ID by Name node targeting a DecalRoad
-- Increment idx over time to animate something along the road
-- Use rot output to orient objects facing along the road

Additional Methods

C:init()

Initializes the node, setting up pins and default properties.


See Also

  • Collection Marker (Flowgraph Node) - Related reference
  • Custom Lua Command (Flowgraph Node) - Related reference
  • Get Object Field (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Get Player Vehicle ID (Flowgraph Node)

- **Node Name:** `Get Player Vehicle ID`

Show/Hide Object (Flowgraph Node)

- **Node Name:** `Show/Hide Object`

On this page

OverviewPin SchemaInput PinsOutput PinsBehaviorInternalsKey DependenciesHow It WorksExample UsageAdditional MethodsC:init()See Also