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

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.

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.


Class Methods

MethodSignatureDescription
C:init()Sets visible = true
C:setup(cluster)Reads pump scene objects (area + icon pairs), computes OBB axes, creates pump icons
C:update(data)Checks OBB overlap for each pump at sub-cruising speed; fades icons with LOS raycasting
C:createObjects()Creates/finds BeamNGWorldIconsRenderer singleton
C:hide()Zeroes all pump icon alphas
C:show()Sets visible true
C:clearObjects()Removes all pump icons from renderer
C:interactInPlayMode(interactData, elements)Adds elemData when any pump overlaps
C:drawOnMinimap(td)Draws circles at each pump's icon position
C:drawAxisBox(corner,x,y,z,clr?)Debug: draws OBB with filled faces

Module Functions

FunctionSignatureReturnsDescription
create(...)markerCreates a new gas station marker instance
cluster(pois, allClusters)nilOne cluster per POI (no grouping)

Internals

Pump Data Structure

Each pump is defined by a pair of scene object names [areaObject, iconObject]:

pumpData = {
  areaPos = pos,
  xVec = rot*vecX*scl.x,
  yVec = rot*vecY*scl.y,
  zVec = rot*vecZ*scl.z,
  iconPos = iconObject:getPosition(),
  iconPosSmoother, iconAlphaSmoother,
  overlap = false,
  iconId, iconInfo,
}

Overlap Detection

Uses overlapsOBB_OBB(vehicleBB, pumpBB) - only checked when cruisingSpeedFactor < 1 (below cruising speed). Each pump is checked independently.

Icon Behavior

  • Icons lift 0.25 units when overlapping
  • Alpha fades via LOS raycast: castRayStatic from camera to icon position
  • Alpha is smoothed with newTemporalSmoothingNonLinear(30,30)
  • Only updates alpha when needed (alphaNeedsUpdate optimization)

Icon Types

  • Standard stations: poi_fuel_round
  • Electric stations (cluster.electric = true): poi_charge_round

How It Works

  1. Cluster setup reads pump area/icon scene objects and computes OBB data
  2. Each frame: checks OBB overlap at each pump, raycasts for icon visibility
  3. When any pump overlaps at parking speed: shows interaction prompt
  4. Icons smoothly appear/disappear based on proximity and line of sight

See Also

  • Big Map Marker - Related reference
  • Crawl Marker - Related reference
  • Drift Line Marker - Related reference
  • Gameplay Systems Guide - Guide

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.

Inspect Vehicle Marker

Marker class for vehicle inspection/interaction points. Renders a floating icon with distance-based height scaling, supports navigation focus with bounce animation, and detects player proximity for in

On this page

Class MethodsModule FunctionsInternalsPump Data StructureOverlap DetectionIcon BehaviorIcon TypesHow It WorksSee Also