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
Drift Zone BoundsDrift Race PathDrift UI DisplayDrift Detection EngineDrift SystemDrift Quick MessagesDrift Save/LoadDrift ScoreboardDrift Scoring SystemDrift AudioDrift StallingDrift StatisticsDrift Stunt Zones
Freeroam CruisingFreeroam Drift Spots

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 Extensionsgameplaydriftfreeroam

Freeroam Cruising

Reference for `gameplay_drift_freeroam_cruising`, which automatically shows/hides the drift angle UI when the player sustains a drift chain while in freeroam.

Reference for gameplay_drift_freeroam_cruising, which automatically shows/hides the drift angle UI when the player sustains a drift chain while in freeroam.


Dependencies

gameplay_drift_general, gameplay_drift_drift


Exports

| Function | Signature | Description | |------ | M.dependencies | table | {"gameplay_drift_general", "gameplay_drift_drift"} |----|-----------|-------------| | onUpdate | (dtReal, dtSim, dtRaw) | Detect start/end of sustained drifting |


Internals

SymbolValuePurpose
driftDuration1.5 sMin single drift duration to trigger
minDriftChain2Min chained drifts required
timeToDisableUI2.3 sSeconds after drift ends to hide UI
isDriftCruisingboolCurrent cruising state

How It Works

-- Enable: player is in freeroam, drifting for 1.5+ seconds, with 2+ chain
if context == "inFreeroam"
   and driftDuration >= 1.5
   and chainedDrifts >= 2 then
  -- Show drift angle UI via gameplay_drift_display.onDriftCruisingToggled(true)
end

-- Disable: stop drifting for 2.3 seconds
-- Timer resets every frame while still drifting
-- When timer expires → hide UI

Key Behaviors

  • Only activates in "inFreeroam" context (not during challenges or missions)
  • Calls gameplay_drift_display.onDriftCruisingToggled(true/false) which shows only the drift angle overlay (not full mission UI)
  • The 2.3-second disable delay prevents flickering during brief drift transitions
  • Profiler tracks garbage collection when general debug is enabled

Module Variables

VariableTypeDescription
M.dependenciestable{"gameplay_drift_general", "gameplay_drift_drift"}
M.onUpdate(dtReal, dtSim, dtRaw)-

See Also

  • drift/freeroam/driftSpots - Freeroam Drift Zone Manager - Related reference
  • Gameplay Systems Guide - Guide

Drift Stunt Zones

Reference for `gameplay_drift_stuntZones`, which manages the lifecycle, detection, rendering, and scoring of drift stunt zones (donuts, drift-throughs, hit poles, near poles).

Freeroam Drift Spots

Reference for `gameplay_drift_freeroam_driftSpots`, which manages freeroam drift zones - detecting when the player drifts through a start line, running the challenge, tracking scores/highscores, and i

On this page

DependenciesExportsInternalsHow It WorksKey BehaviorsModule VariablesSee Also