API ReferenceGE ExtensionsgameplaydriftstuntZones
Near Pole Zone
Reference for the near-pole stunt zone class, loaded via `require("gameplay/drift/stuntZones/nearPole")`.
Reference for the near-pole stunt zone class, loaded via require("gameplay/drift/stuntZones/nearPole").
Overview
Spawns a delineator pole (striped config) that scores based on how close the player's vehicle corners pass to it while drifting, without actually hitting it. Returns a class factory function.
Factory
return function(data) → nearPoleInstanceClass Methods
| Method | Signature | Description |
|---|---|---|
init | (data) | Stores data, resets, spawns delineator (stripes.pc config), creates marker |
reset | () | Resets pole physics, clears/recreates marker |
resetData | () | Resets activeData: available=true, minCornerDist=∞, lastFramePlDist=∞ |
clear | () | Deletes pole vehicle and clears marker |
clearMarker | () | Removes overhead race marker |
createMarker | () | Creates overhead marker at pole position |
accomplish | () | Clears marker, sets unavailable, fires onAnyStuntZoneAccomplished → onNearPoleAccomplished with closeness factor |
detectStunt | () | Checks vehicle corners within maxDist (4m); scores when player starts moving away |
isAvailable | () | Returns self.activeData.available |
onUpdate | (dtReal, dtSim) | Updates marker, detects physical collision (which nullifies the near-miss) |
onVehicleDestroyed | (vehId) | If pole destroyed, removes this stunt zone |
Key Behaviors
maxDist= 4 meters - corners must be within this range- Closeness is calculated as
1 - (minCornerDist / maxDist)- closer = higher score - Scores when
plDist > lastFramePlDist(player moving away) and pole wasn't hit - If the pole IS hit (
objectCollisions),hitPoleflag prevents scoring - Uses
gameplay_drift_drift.getVehCorners()for precise corner distance checks - One-shot: unavailable after scoring until
reset()
See Also
- drift/stuntZones/donut - Donut Stunt Zone - Related reference
- drift/stuntZones/driftThrough - Drift-Through Stunt Zone - Related reference
- drift/stuntZones/hitPole - Hit Pole Stunt Zone - Related reference
- Gameplay Systems Guide - Guide
Hit Pole Zone
Reference for the hit-pole stunt zone class, loaded via `require("gameplay/drift/stuntZones/hitPole")`.
Big Map Marker
Marker class for the big map view. Renders a floating icon with a column below it, using `BeamNGWorldIconsRenderer`. Handles alpha smoothing, selection/hover states, and multi-POI clustering.