RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking
Rally Audio ManagerRally Camera Path PlayerRally ClientRally Cut CaptureRally EnumsRally Extension HelperRally GeometryRally ManagerRecce ManagerRecce AppRecce SettingsRally Settings ManagerSnap-to-RoadTraffic Exclusion ZonesRally UtilityRally Vehicle CaptureRally Vehicle Tracker

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 Extensionsgameplayrally

Rally Camera Path Player

Plays a cinematic camera path along a snaproad for rally stage preview. Generates a Catmull-Rom camera path from driveline points with configurable height offset, FOV, and playback speed.

Plays a cinematic camera path along a snaproad for rally stage preview. Generates a Catmull-Rom camera path from driveline points with configurable height offset, FOV, and playback speed.


Constructor

local CameraPathPlayer = require('/lua/ge/extensions/gameplay/rally/cameraPathPlayer')
local player = CameraPathPlayer(snaproad)

Public API

MethodSignatureReturnsDescription
init(snaproad)nilStores the snaproad reference
play()nilGenerates and plays a camera path from the snaproad
stop()nilStops the current camera path

Internals

Default Parameters

ParameterValueDescription
metersBefore40Meters of path before the current point
metersAfter20Meters of path after the current point
heightOffset2Camera height above the path in meters
fov70Field of view in degrees
playbackRateKph80Camera movement speed in km/h

Path Generation (loadPath)

The internal loadPath function converts snaproad points into a core_paths-compatible camera path:

  1. Iterates through points, calculating accumulated distance between them
  2. Converts distance to time using the playback rate (m/s)
  3. Creates marker objects with position (elevated by height offset), rotation, FOV, and time
  4. Builds a path JSON structure with rotation fix-up (quaternion dot product sign correction)
  5. Applies default spline smoothing (0.5) to markers

How It Works

  1. play() fetches points from the snaproad for a window around the current position
  2. Points are converted to camera markers with height offset and calculated timing
  3. The path is passed to core_paths.playPath() for Catmull-Rom spline interpolation
  4. stop() calls core_paths.stopCurrentPath() to end playback

Usage Examples

-- Create and play a camera preview
local camPlayer = CameraPathPlayer(mySnaproad)
camPlayer:play()

-- Later, stop the preview
camPlayer:stop()

Notes

  • Uses irregular point spacing: timing is based on accumulated distance rather than fixed intervals
  • Camera path format matches core_paths version 6 with rotFixId rotation correction
  • The trackPosition field is set to false - camera follows the spline, not a vehicle
  • Playback rate is converted from km/h to m/s internally

See Also

  • Rally Audio Manager - Related reference
  • Rally Client - Related reference
  • Rally Cut Capture - Related reference
  • Gameplay Systems Guide - Guide

Rally Audio Manager

Manages a queue of pacenote audio playback and pauses for the rally co-driver system. Handles sequential playback with breath timing between notes and damage interruption.

Rally Client

HTTP client for communicating with a local rally companion server. Sends recording cut commands and retrieves transcription results via REST API on `localhost:27872`.

On this page

ConstructorPublic APIInternalsDefault ParametersPath Generation (loadPath)How It WorksUsage ExamplesNotesSee Also