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 Route

Renders the navigation route and off-screen route pointer on the minimap.

Renders the navigation route and off-screen route pointer on the minimap.


Overview

ui_apps_minimap_route draws the GPS navigation route as a two-layer polyline (white outline + blue fill with distance-based color blending) and an edge pointer when the destination is off-screen.

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


Exports (M)

FunctionSignatureDescription
drawNavigationRoute(td, dpi)Draws the navigation route polyline. Supports route overrides via onMinimapRouteOverride hook.
drawRoutePointer(td)Draws an edge pointer toward the route destination when it's off-screen.

Internals

Route Source

The route comes from core_groundMarkers.routePlanner.path, unless overridden:

local routeOverrides = {}
extensions.hook("onMinimapRouteOverride", routeOverrides)
if next(routeOverrides) then
  for _, route in ipairs(routeOverrides) do
    drawRoute(route, td, dpi)
  end
else
  drawRoute(rp.path, td, dpi)
end

Color Blending

Route color blends from blue to white based on proximity to the player (first 75 meters):

local blendDistance = 75
local function getRouteColor(distance)
  if distance > blendDistance then
    return clrNavFg  -- blue
  else
    local t = (1 - distance / blendDistance) * 0.66
    return color(t*255, (0.4 + 0.6*t)*255, 255, 255)  -- blends toward white
  end
end

Drawing

Route points are transformed to minimap coordinates, then drawn as:

  1. Background pass - White outline at 4px width on ROUTE_BG layer
  2. Foreground pass - Colored fill at 2px width on ROUTE_FG layer

The route is capped at 3000 points via a pre-allocated vec3 pool for zero-allocation rendering.

Edge Pointer

When the destination is outside the minimap bounds, drawRoutePointer uses ui_apps_minimap_utils.simpleCircleWithEdgePointer() to draw a directional indicator at the minimap edge.


How It Works

  1. drawNavigationRoute checks for route overrides, falls back to core_groundMarkers
  2. Route path points are projected to minimap space via worldToMapXYZ
  3. Two-pass rendering: white outline + distance-blended blue fill
  4. drawRoutePointer places a directional marker at the map edge pointing toward the destination

Additional Exports

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

  • M.drawNavigationRoute
  • M.drawRoutePointer

Minimap Roads

Renders navgraph road segments on the minimap with spatial culling.

Minimap Topographic Map

Generates and renders topographic contour lines from terrain heightmap data.

On this page

OverviewExports (M)InternalsRoute SourceColor BlendingDrawingEdge PointerHow It WorksAdditional Exports