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
Big Map MarkerCrawl MarkerDrift Line MarkerGas Station MarkerInspect Vehicle MarkerInvisible MarkerInvisible TriggerMission MarkerParking MarkerWalking MarkerZone 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 Extensionsgameplaymarkers

Drift Line Marker

Marker class for freeroam drift start lines. Shows/hides scene objects that form the visual start line. Detects when the player drives through the line to trigger a drift challenge.

Marker class for freeroam drift start lines. Shows/hides scene objects that form the visual start line. Detects when the player drives through the line to trigger a drift challenge.


Class Methods

MethodSignatureDescription
C:init()Assigns unique id
C:setup(cluster)Sets position, direction, radius, line id; shows marker objects from scene
C:createObjects()No-op (uses scene objects)
C:clearObjects()Hides all markerObjects in the scene tree
C:hide()No-op
C:show()No-op
C:update()No-op
C:interactWhileMoving(interactData)Detects if vehicle is inside the circle; triggers gameplay_drift_freeroam_driftSpots.detectStart(lineId)
C:drawOnMinimap(td)Draws line between left/right endpoints (or circle if no direction)

Module Functions

FunctionSignatureReturnsDescription
create(...)markerCreates a new drift line marker instance
cluster(pois, allClusters)nilCreates one cluster per POI (no grouping)

Internals

Detection

Simple squared-distance check: vehPos:squaredDistance(pos) <= radius². Only checks while driving (not walking). On detection, calls gameplay_drift_freeroam_driftSpots.detectStart(lineId).

Visual Line

The left/right endpoints are computed from the startDir:

local left = vec3(startDir.y, -startDir.x, 0):normalized()
self.left = pos + left * radius * 0.7
self.right = pos - left * radius * 0.7

Marker Objects

Scene objects listed in cluster.markerObjects are shown on setup and hidden on clear. These are pre-placed objects in the level (e.g. road markings).

Clustering

Each POI becomes its own cluster - drift line markers are never grouped.

How It Works

  1. Level POI system provides drift line positions with start directions
  2. On setup, scene objects become visible
  3. Each frame while driving: checks if player is within radius
  4. On detection: notifies drift freeroam system to potentially start a drift challenge

See Also

  • Big Map Marker - Related reference
  • Crawl Marker - Related reference
  • Gas Station Marker - Related reference
  • Gameplay Systems Guide - Guide

Crawl Marker

Marker class for rock-crawling activity zones. Renders a floating icon at a configurable position, detects sphere-overlap with the vehicle bounding box, and supports activity interaction prompts.

Gas Station Marker

Marker class for gas station / charging station pump areas. Renders floating fuel/charge icons at each pump, detects OBB overlap with the vehicle, and supports interaction prompts for refueling.

On this page

Class MethodsModule FunctionsInternalsDetectionVisual LineMarker ObjectsClusteringHow It WorksSee Also