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
Route Distance (Flowgraph Node)Closest Road (Flowgraph Node)Custom Lua (Flowgraph Node)Distance Between (Flowgraph Node)Waypoints Distance (Flowgraph Node)File Exists (Flowgraph Node)Get First Element of Table (Flowgraph Node)Get Level Data (Flowgraph Node)Get Map Objects IDs by DynField (Flowgraph Node)Get Table Value By Key (Flowgraph Node)GHOST (Flowgraph Node)Hide Loading Screen (Flowgraph Node)Color HSV (Flowgraph Node)Line Point From Xnorm (Flowgraph Node)Load Level (Flowgraph Node)Load Project (Flowgraph Node)On Menu (Flowgraph Node)Perlin Noise (Flowgraph Node)Pop Action Map (Flowgraph Node)Get Project InfoPush Action MapRandom ColorRandom NumberRandom QuaternionRandom VectorRoad PropertiesGet Navgraph RouteRoute PositionTemplate NodeTimeTimed SequenceTo NumberTo StringWorld Editor Open

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 Extensionsflowgraphnodesutil

Route Position

- **Node Name:** `Route Position`

Overview

  • Node Name: Route Position
  • Category: once_instant
  • File: extensions/flowgraph/nodes/util/routePosition.lua

Gets a position and direction along a navgraph route at a specified distance ahead. Useful for placing objects, triggers, or checkpoints along a pre-computed route.

Pin Schema

Input Pins

PinTypeDefaultDescription
navgraphRoutetable (navgraphPath)-Array of waypoints forming a route
distancenumber-Distance ahead on the route

Output Pins

PinTypeDescription
posvec3Target position at the given distance along the route
dirVecvec3Direction vector of the road segment at that position
n1stringFirst node of the road segment
n2stringSecond node of the road segment

Internals

Key Methods

MethodDescription
init()Calls onNodeReset()
_executionStopped()Calls onNodeReset()
onNodeReset()Creates a fresh route object
workOnce()Sets up the route path and steps ahead by the given distance

Route Object

Uses gameplay/route/route module internally. A new route instance is created on reset. The route is set up via setupPathMultiWaypoints() and then stepAhead() returns the road segment and interpolated position.

How It Works

  1. On reset, instantiates a fresh route object from gameplay/route/route.
  2. When executed, calls route:setupPathMultiWaypoints() with the input waypoint array.
  3. Calls route:stepAhead(distance) to find the position at the given distance.
  4. Outputs the interpolated position, direction vector (normalized), and the two navgraph node names of the containing segment.

Usage Example

-- Get position 50 meters ahead on a route:
-- navgraphRoute = {"wp_001", "wp_002", "wp_003", ...}
-- distance = 50
-- Output: pos = {x, y, z}, dirVec = {dx, dy, dz}, n1 = "wp_002", n2 = "wp_003"

-- Chain with Get Navgraph Route:
-- 1. routePointToPoint → navgraphRoute
-- 2. routePosition(navgraphRoute, distance) → pos, dirVec

-- Place a checkpoint 100m ahead:
-- distance = 100 → use pos output for checkpoint placement

Key Dependencies

  • gameplay/route/route - route calculation module
  • map.getMap().nodes - navgraph node positions for direction calculation

See Also

  • Route Distance (Flowgraph Node) - Related reference
  • Closest Road (Flowgraph Node) - Related reference
  • Custom Lua (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Get Navgraph Route

- **Node Name:** `Get Navgraph Route`

Template Node

- **Node Name:** `Template Node`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsKey MethodsRoute ObjectHow It WorksUsage ExampleKey DependenciesSee Also