RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Bus DriverDamage GoalDemolition DerbyDistance GoalDrift GoalFinish Race GoalNo-Move GoalPosition GoalQuick RaceQuick Race LoaderRace MarkersRace DebugRace Goals ManagerRace UIScenario HelperScenario EngineScenarios LoaderSpeed GoalTime Limit GoalWaypoint ActionScenario Waypoints
Attention MarkerCrawl MarkerCylinder MarkerNone MarkerOverhead MarkerRing Marker - 3D Ring Checkpoint MarkerSide Column MarkerSide Hologram MarkerSide MarkerSingle Hologram Marker

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 ExtensionsscenarioraceMarkers

Cylinder Marker

A classic race checkpoint marker consisting of a ground base ring and a tall transparent cylinder. Color-coded by checkpoint type with distance-based alpha fading.

A classic race checkpoint marker consisting of a ground base ring and a tall transparent cylinder. Color-coded by checkpoint type with distance-based alpha fading.


Class API (OOP via metatable)

MethodSignatureDescription
C:init(id)Initializes state, colors, fade distances
C:update()Updates alpha based on camera distance
C:setToCheckpoint(wp)Positions and scales base + cylinder from waypoint
C:setMode(mode)Sets color based on mode, shows/hides
C:setVisibility(v)Shows/hides base and cylinder objects
C:hide/show()Visibility shortcuts
C:createMarkers()Creates base and cylinder TSStatic objects
C:clearMarkers()Destroys all created objects
C:createObject(shapeName, objectName) → TSStaticHelper to create a marker object

Visual Modes

ModeColorDescription
defaultRed (1, 0.07, 0)Standard checkpoint
nextGray (0.3, 0.3, 0.3)Upcoming checkpoint
startGreen (0.4, 1, 0.2)Start line
lapGreen (0.4, 1, 0.2)Lap boundary
recoveryYellow (1, 0.85, 0)Recovery point
finalBlue (0.1, 0.3, 1)Finish line
branchOrange (1, 0.6, 0)Branching path

Components

ObjectShapeScaling
Basecheckpoint_marker_base.daeradius × 2 in all axes
Cylindercheckpoint_marker.daeradius in X/Y, fixed 50 in Z

Alpha Fading

  • Fade near: 0 units (fully visible when close)
  • Fade far: 70 units (fully transparent beyond)
  • Base alpha: 0.75 × distance factor
  • Cylinder alpha: 0.95 × distance factor
  • Per-waypoint fadeNear/fadeFar overrides supported

How It Works

  1. Constructor creates instance with default mode colors
  2. createMarkers() spawns base ring and tall cylinder TSStatic objects
  3. setToCheckpoint(wp) positions both at waypoint, scales by radius
  4. setMode(mode) applies the mode's color to currentColor and updates visibility
  5. update() each frame:
    • Calculates 3D distance from camera to marker center
    • Applies inverse lerp for smooth alpha fade
    • Updates instance color render data on both objects

Usage Examples

-- Create a cylinder checkpoint marker
local marker = require('scenario/raceMarkers/cylinderMarker')(1)
marker:createMarkers()
marker:setToCheckpoint({
  pos = vec3(100, 200, 50),
  radius = 5,
})
marker:setMode('default')  -- red checkpoint

-- Each frame
marker:update()

-- Change to finish mode
marker:setMode('final')  -- turns blue

-- Cleanup
marker:clearMarkers()

Key Notes

  • Simplest of the race marker types - just base + cylinder, no animation
  • Cylinder height is fixed at 50 units regardless of radius
  • Mode colors are deep-copied per instance, allowing per-marker customization
  • Uses inverseLerp for smooth distance-based fading
  • Objects added to ScenarioObjectsGroup with canSave = false
  • No bobbing, no LOS checks - purely visual with alpha fade

See Also

  • Race Marker: Attention - Floating Arrow Checkpoint Marker - Related reference
  • Race Marker: Crawl Marker - Arrow + Flag + Column Checkpoint - Related reference
  • None Marker - Invisible Race Checkpoint Marker - Related reference
  • Scenario System Guide - Guide

Crawl Marker

A feature-rich race checkpoint marker with a floating arrow, two roadside flags, and a distant visibility column. Supports multiple color modes, fade distances, line-of-sight occlusion avoidance, and

None Marker

A no-op race marker implementation. All methods exist but do nothing, making checkpoints completely invisible. Used when no visual marker is desired.

On this page

Class API (OOP via metatable)Visual ModesComponentsAlpha FadingHow It WorksUsage ExamplesKey NotesSee Also