RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
ui/ambientSound - Ambient Sound Stream PlayerUI Apps ManagerUI AudioBindings LegendCamera Distance AppConsole (consoleNG)Credits MusicExternal App (WebSocket UI Server)Fade ScreenGame BlurGameplay App ContainersGrid SelectorLivery EditorMessages DebuggerMessages/Tasks App ContainersMission InfoPolice InfoTop BarUI ModsUI Navigation / MapVehicle Paint EditorVehicle Vicinity AppUI Visibility
Generic Mission Data AppPoints Bar App
Minimap Additional InfoMinimap LayersMinimap (Main)Minimap RoadsMinimap RouteMinimap Topographic MapMinimap UtilitiesMinimap Vehicles

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 Extensionsuiappsminimap

Minimap Vehicles

Renders player and other vehicles on the minimap with role-based styling.

Renders player and other vehicles on the minimap with role-based styling.


Overview

ui_apps_minimap_vehicles draws all visible vehicles on the minimap as directional triangles or circles. Player vehicle, police, usable, and other vehicles each get distinct colors and layers.

Extension path: lua/ge/extensions/ui/apps/minimap/vehicles.lua


Exports (M)

FunctionSignatureDescription
setMinimapState(w, h, cx, cy, camPos, ...)Syncs camera/canvas state from main minimap each frame.
drawPlayer(dtReal, dtSim) → adjustedScale?Draws the player vehicle/walking indicator and returns dynamic zoom scale.
drawOtherVehicles(dtReal, dtSim)Draws all non-player vehicles with role-based filtering and styling.

Internals

Vehicle Shapes

drawVehicle(pos, fwd, color, size, asCircle, layer) renders two shapes:

  • Circle mode (asCircle=true) - For walking/unicycle: circle body + forward triangle
  • Diamond/arrow mode - For vehicles: two triangles forming an arrow shape pointing forward

Both have a white border (from navBg style color) and colored fill.

Player Drawing

The player vehicle uses velocity-based dynamic zoom:

local dynamicScale = clamp(velSmoother:get(vel > 10 and 3.0 or 1, dtReal), 1, 1.75)
local walkScale = walkSmoother:get(isWalking and 0 or 1, dtReal)
  • Walking uses gameplay_walk.getPosXYZ() and walking rotation
  • Driving uses map.objects[vehId].pos and dirVec
  • Free camera draws a cone-shaped indicator with lookahead offset

Other Vehicle Filtering

Vehicles are filtered by debug settings and role:

SettingVehicle Type
drawParkedVehiclesVehicles in gameplay_parking
drawTrafficVehiclesVehicles in gameplay_traffic
drawActivePoliceVehiclesPolice pursuing the player
drawOtherVehiclesGeneral drivable vehicles

Additionally:

  • Props, Unknown, Utility, PropTraffic, and Traffic types are skipped via ignoredTypes
  • Blacklisted vehicles (gameplay_walk.isVehicleBlacklisted) are colored gray

Color Assignment

Vehicle RoleColorLayer
PlayerOrange (clrFocus)VEHICLE_PLAYER
Usable (switchable)Muted orange (clrFocusMuted)VEHICLES_USABLE
Blacklisted/unusableGray (grayMuted)VEHICLES_OTHER
Police (active pursuit)Flashing red/blueVEHICLES_POLICE

Police vehicles flash using math.sin(os.clock()*5) for alternating red/blue.


How It Works

  1. Main minimap calls setMinimapState() to sync camera data
  2. drawOtherVehicles() iterates all active vehicles, filters by role/settings
  3. Each vehicle is drawn as an arrow or circle with role-based color
  4. drawPlayer() draws the player with dynamic zoom scaling based on velocity
  5. Returns adjustedScale so the minimap can zoom out at higher speeds

Additional Exports

The following exports are available but not yet documented in detail:

  • M.drawOtherVehicles
  • M.drawPlayer
  • M.setMinimapState

Minimap Utilities

Coordinate transforms, drawing helpers, color sets, and boundary clamping for the minimap.

App Selector (General)

Grid selector backend for browsing and adding UI apps to layouts.

On this page

OverviewExports (M)InternalsVehicle ShapesPlayer DrawingOther Vehicle FilteringColor AssignmentHow It WorksAdditional Exports