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)
| Function | Signature | Description |
|---|---|---|
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)
endColor 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
endDrawing
Route points are transformed to minimap coordinates, then drawn as:
- Background pass - White outline at 4px width on
ROUTE_BGlayer - Foreground pass - Colored fill at 2px width on
ROUTE_FGlayer
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
drawNavigationRoutechecks for route overrides, falls back tocore_groundMarkers- Route path points are projected to minimap space via
worldToMapXYZ - Two-pass rendering: white outline + distance-blended blue fill
drawRoutePointerplaces 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.drawNavigationRouteM.drawRoutePointer