Mission Marker
Primary marker class for mission POIs. Renders floating icons with distance-based height, ground decals (dot + ring), line-of-sight alpha fading, and OBB-based player area detection. Supports smart cl
Primary marker class for mission POIs. Renders floating icons with distance-based height, ground decals (dot + ring), line-of-sight alpha fading, and OBB-based player area detection. Supports smart clustering of nearby missions.
Class Methods
| Method | Signature | Description |
|---|---|---|
C:init | () | Assigns id, creates smoothers for decal/ring/bigmap/icon/position/cruising alpha |
C:setup | (cluster) | Creates icon in renderer, configures ground decals, sets up smoothers |
C:update | (data) | Full per-frame update: icon positioning/alpha, ground decal alpha, area detection |
C:playerIsInArea | (data) | Returns overlapsOBB_Sphere(vehicleBB, markerPos, radius) |
C:createObjects | () | Creates/finds BeamNGWorldIconsRenderer singleton |
C:clearObjects | () | Removes icons and mesh from renderer/scene |
C:hide | () | Resets smoothers, zeroes all icon/mesh alpha |
C:show | () | Sets visible true |
C:interactInPlayMode | (interactData, elements) | Adds elemData when player is in area |
C:drawOnMinimap | (td, dpi) | Draws filled triangle on minimap |
Module Functions
| Function | Signature | Returns | Description |
|---|---|---|---|
create | (...) | marker | Creates a new mission marker |
cluster | (pois, allClusters) | nil | Quadtree-based clustering of nearby missions (radius 1.5m) |
Internals
Fixed Radius
All mission markers use hardcodedRadius = 1.2m for both the interaction sphere and clustering overlap detection.
Ground Decals
Two decals per marker:
- Dot (
dot_128.png): Always visible when in range,scale = radius * 0.7 - Ring (
outline_512.png): Only visible when player is in area,scale = radius * 2.7
Both fade based on distance (show < 40m) and bigmap state.
Icon Positioning
- Inside area: rises to
highestBBPointZ + 0.5(above vehicle) - Within 50m (100m if focused): at
iconHeightBottom(1.2m) - Beyond range: hides (height → 0)
- Line-of-sight check via
castRayStatic
Area Detection
Uses overlapsOBB_Sphere(vehicleBBCenter, halfAxes, markerPos, radius) for precise vehicle-marker overlap.
Clustering Algorithm
- Loads all mission POIs into a quadtree with 1.5m bounding boxes
- For each unclustered POI: queries quadtree for overlapping neighbors
- Merges overlapping POIs into a single cluster
- Multi-mission clusters get numbered icons:
mission_no-XX_triangle - Clusters sorted by date (newest first)
Minimap
Draws a filled equilateral triangle in blue (rgb(72, 125, 249)).
How It Works
- POI system provides mission locations → quadtree clusters nearby ones
- Each cluster gets one marker with merged
elemData - Per frame: icon fades in/out with distance, ground decals show proximity
- At parking speed + area overlap: shows activity prompt with all clustered missions
See Also
- Big Map Marker - Related reference
- Crawl Marker - Related reference
- Drift Line Marker - Related reference
- Gameplay Systems Guide - Guide
Invisible Trigger
Invisible sphere-based trigger marker. Has no visual representation but detects when the player vehicle enters or exits a radius, firing `onEnter` and `onInside` callbacks. Used for gameplay triggers
Parking Marker
Marker class for parking spot interactions. Renders a floating icon, a ground stripe decal, and a 3D outline mesh. Detects vehicle-to-parking OBB overlap with two modes (contained or overlap). Support