Crawl Marker
Marker class for rock-crawling activity zones. Renders a floating icon at a configurable position, detects sphere-overlap with the vehicle bounding box, and supports activity interaction prompts.
Marker class for rock-crawling activity zones. Renders a floating icon at a configurable position, detects sphere-overlap with the vehicle bounding box, and supports activity interaction prompts.
Class Methods
| Method | Signature | Description |
|---|---|---|
C:init | () | Sets visible = true |
C:setup | (cluster) | Configures position, radius, icon position; creates sphere trigger area with icon |
C:update | (data) | Checks sphere overlap with vehicle BB center; fades icon with distance and LOS |
C:createObjects | () | Creates/finds BeamNGWorldIconsRenderer singleton |
C:hide | () | Sets visible false, zeroes icon alpha |
C:show | () | Sets visible true |
C:clearObjects | () | Removes icon from renderer |
C:interactInPlayMode | (interactData, elements) | Adds elemData to interactable list when overlapping |
C:drawOnMinimap | (td) | Draws circle at icon position on minimap |
C:drawAxisBox | (corner, x, y, z, clr?) | Debug: draws OBB wireframe with filled faces |
Module Functions
| Function | Signature | Returns | Description |
|---|---|---|---|
create | (...) | marker | Creates a new crawl marker instance |
cluster | (pois, allClusters) | nil | Groups POIs by position+iconPos identity |
Internals
Trigger Area
triggerArea = {
areaPos = cluster.pos,
radius = cluster.radius or 2.0,
iconPos = cluster.iconPos,
iconPosSmoother, iconAlphaSmoother,
overlap = false,
maxVisibleDistance = 35,
}Overlap Detection
Simple distance check: (bbCenter - areaPos):length() < radius. No walking requirement (unlike some other markers).
Icon Behavior
- Icon lifts vertically when overlapping (
iconOffsetHeight=0.5,iconLift=1.0) - Alpha fades based on distance (max 35m) and line-of-sight raycasting
- A vertical line connects the icon to its base position when lifted
Clustering
POIs are clustered when their pos and iconPos are identical. Multiple activities at the same location share one marker with combined elemData.
How It Works
setup()creates a sphere trigger and floating icon- Each frame: checks distance overlap, raycasts for LOS
- When overlapping at parking speed: adds activities to interactable elements
- Icon smoothly lifts/lowers and fades based on proximity
See Also
- Big Map Marker - Related reference
- Drift Line Marker - Related reference
- Gas Station Marker - Related reference
- Gameplay Systems Guide - Guide
Big Map Marker
Marker class for the big map view. Renders a floating icon with a column below it, using `BeamNGWorldIconsRenderer`. Handles alpha smoothing, selection/hover states, and multi-POI clustering.
Drift Line Marker
Marker class for freeroam drift start lines. Shows/hides scene objects that form the visual start line. Detects when the player drives through the line to trigger a drift challenge.