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
Donut ZoneDrift Through ZoneHit Pole ZoneNear Pole Zone

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 ExtensionsgameplaydriftstuntZones

Donut Zone

Reference for the donut stunt zone class, loaded via `require("gameplay/drift/stuntZones/donut")`.

Reference for the donut stunt zone class, loaded via require("gameplay/drift/stuntZones/donut").


Overview

A circular zone where the player must accumulate 360° of drift angle while inside the circle. Returns a class factory function (not a module with M exports).


Factory

-- Returns a constructor function:
return function(data) → donutInstance

Class Methods

MethodSignatureDescription
init(data)Stores zone data, calls reset
reset()Resets activeData: cooldown=0, totalDriftAngle=0, completedPerc=0
accomplish()Resets angle, sets cooldown, fires onAnyStuntZoneAccomplished → onDonutDriftAccomplished
detectStunt()Accumulates angleDiff from drift system; accomplishes at ≥360°
isAvailable()Returns currCooldown <= 0
isPlayerInside()Distance check: vehPos:distance(pos) < scl; resets angle if outside
onUpdate()Calls sendDecals
sendDecals()Draws circular decal ring showing cooldown/fill progress

Key Behaviors

  • Circle is drawn with scl * 10 decal segments
  • Decal colors reflect state: green (ready), blue (filling), red (cooldown), white (cooldown remaining)
  • Angle accumulation resets when player leaves the circle or drift ends

See Also

  • drift/stuntZones/driftThrough - Drift-Through Stunt Zone - Related reference
  • drift/stuntZones/hitPole - Hit Pole Stunt Zone - Related reference
  • drift/stuntZones/nearPole - Near Pole Stunt Zone - Related reference
  • Gameplay Systems Guide - Guide

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

Drift Through Zone

Reference for the drift-through stunt zone class, loaded via `require("gameplay/drift/stuntZones/driftThrough")`.

On this page

OverviewFactoryClass MethodsKey BehaviorsSee Also