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

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 Extensionsui

UI Navigation / Map

Provides navigation map data, routing, POI, and real-time object tracking for the UI.

Provides navigation map data, routing, POI, and real-time object tracking for the UI.


Overview

ui_uiNavi is the main navigation extension. It supplies the minimap/bigmap with road nodes, tracked objects (vehicles/camera), spawn points, points of interest, routing, and bus stops. Updated every GUI frame.

Extension path: lua/ge/extensions/ui/uiNavi.lua


Exports (M)

FunctionSignatureDescription
onGuiUpdate(dtReal, dtSim, dtRaw)Pushes tracked objects and player position to UI each frame.
onVehicleSwitched(oid, nid)Hook for vehicle switch (currently no-op).
requestUIDashboardMap() → tableReturns full map data (terrain tiles, POI, road nodes) and triggers NavigationMap.
requestVehicleDashboardMap(dashboard, initmap, vehId)Sends map data to a vehicle's JS dashboard.
findClosestRoad(x, y, z) → nodeFinds the closest road node to world coordinates.
route_start(wp, pos)Starts ground-marker route to waypoint.
route_end()Ends the active route.
route_requestStatus(oldPos, newPos)Updates route, checks arrival (< 50m).
planRoute(posX, posY)Plans a route between two points, triggers RoutePlanned.
getBusStops() → tableReturns bus stop positions (merged nearby stops).
getSpawnpoints() → tableReturns spawn sphere positions + metadata.
getPointsOfInterest() → tableReturns POI from PointOfInterestSet.
requestPoi()Triggers MapPointsOfInterest guihook.
getMissions() → tableReturns current mission markers.
setMissions(m)Sets mission markers and triggers MapMissions.
requestMissions()Triggers MapMissions guihook.
onExtensionLoaded()Hook - initialization on extension load.

Internals

Real-Time Object Tracking (onGuiUpdate)

Each frame:

  1. Iterates map.getTrackedObjects() to get vehicle positions, rotations, speeds.
  2. If no player vehicle or in free camera, falls back to camera position.
  3. Sends NavigationMapUpdate with {controlID, objects}.

Uses a table pool (mapObjectsTblPool) to avoid per-frame allocations.

Road Nodes

  • getNodes() - Full node data with links, filtered by hiddenInNavi.
  • getNodesMinified() - Renamed integer keys, 2D positions only, smaller payload for UI.

Minimap Data

requestUIDashboardMap assembles:

  • Terrain tiles from level info or TerrainBlock fallback
  • Points of interest
  • Road nodes

Routing

  • route_start(wp, pos) - Sets core_groundMarkers path and destination.
  • route_update(oldPos, newPos) - Recalculates path, triggers RouteReachedDestination within 50m.
  • route_end() - Clears ground markers and triggers RouteEnded.

Bus Stops

getBusStops() finds BeamNGTrigger objects of type busstop, merges nearby pairs (< 70m distance) into single points.


Lua Examples

-- Request full map data for UI
extensions.ui_uiNavi.requestUIDashboardMap()

-- Start a route
local wp = map.findClosestRoad(vec3(100, 200, 0))
extensions.ui_uiNavi.route_start(wp, {100, 200, 0})

-- End the route
extensions.ui_uiNavi.route_end()

Hooks Triggered

HookPayloadWhen
NavigationMapUpdate (guihook){controlID, objects}Every GUI frame
NavigationMap (guihook){terrainTiles, poi, nodes}Map data requested
RouteUpdate (guihook)route dataRoute recalculated
RouteReachedDestination (guihook)-Player within 50m of destination
RouteEnded (guihook)-Route cancelled/completed
RoutePlanned (guihook)routeplanRoute called
MapMissions (guihook)missionsMission markers sent
MapPointsOfInterest (guihook)POI listPOI requested

Additional Exports

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

  • M.findClosestRoad
  • M.getBusStops
  • M.getMissions
  • M.getPointsOfInterest
  • M.getSpawnpoints
  • M.onExtensionLoaded
  • M.onGuiUpdate
  • M.onVehicleSwitched
  • M.planRoute
  • M.requestMissions
  • M.requestPoi
  • M.requestUIDashboardMap
  • M.requestVehicleDashboardMap
  • M.route_end
  • M.route_requestStatus
  • M.route_start
  • M.setMissions

UI Mods

Discovers Vue mod components and notifies UI when mod files change.

Vehicle Paint Editor

ImGui tool for editing metallic paint properties on the player vehicle.

On this page

OverviewExports (M)InternalsReal-Time Object Tracking (onGuiUpdate)Road NodesMinimap DataRoutingBus StopsLua ExamplesHooks TriggeredAdditional Exports