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
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). Supports navigation focus with bounce animation.
Class Methods
| Method | Signature | Description |
|---|---|---|
C:init | () | Creates smoothers for position, cruising, alpha, distance, overlap |
C:setup | (cluster) | Creates outline mesh, icon, ground decal; computes OBB vectors |
C:update | (data) | Full update: parking check, icon height/alpha, outline alpha, area change tracking |
C:checkParking | (data) | Computes distance; checks OBB overlap when within 15m and below cruising speed |
C:createObjects | () | Creates/finds BeamNGWorldIconsRenderer singleton |
C:clearObjects | () | Deletes outline mesh, removes icon from renderer |
C:hide | () | Zeroes outline and icon alpha |
C:show | () | Sets visible, forces alpha recalculation |
C:interactInPlayMode | (interactData, elements) | Adds elemData when parked is true |
C:drawOnMinimap | (td) | Draws blue circle at position |
C:drawAxisBox | (corner,x,y,z,clr?) | Debug OBB rendering |
Module Functions
| Function | Signature | Returns | Description |
|---|---|---|---|
create | (...) | marker | Creates a new parking marker |
cluster | (pois, allClusters) | nil | Groups POIs by path (same facility = one cluster) |
Internals
Overlap Modes
"overlap"(default):overlapsOBB_OBB(parking, vehicle)- vehicle just needs to touch the zone"contained":containsOBB_OBB(parking, vehicle)- vehicle must be fully inside (box padded +1 on X/Y, +20 on Z)
Visual Elements
- Outline mesh:
art/shapes/interface/park_outline_marker.dae- scales with cruising factor, alpha tied to speed - Ground decal:
art/shapes/interface/parkDecalStripes.png- fade range expands when overlapping - Floating icon: Default
poi_parking_rect, positioned with distance-based height
Icon Height (Focus Mode)
Same screen-clamping system as inspectVehicleMarker:
- Projects onto camera FOV plane to prevent off-screen positioning
- Bounce animation at close range
- Scale decreases with distance:
linearScale(dist, 100, 1000, 1, 0.65)
Speed Gating
- Overlap only checked when
cruisingSpeedFactor < 1(below ~20 km/h) - Outline/icon fade based on cruising smoother
- Distance check: only within 15m
Clustering
Parking markers are grouped by their path field (typically the facility/site path). Multiple parking spots at the same facility share one cluster. If multiple different icons exist in a cluster, a numbered icon is used.
How It Works
- POI system provides parking spot definitions with pos/rot/scl and optional path
- Setup creates outline mesh, ground decal, and floating icon
- Per frame: checks parking overlap when slow and close, fades visuals
- When parked at parking speed: shows interaction prompt with facility activities
Usage Example
-- Cluster data from POI system:
-- {
-- pos = vec3(...), rot = quat(...), scl = vec3(2.5, 5, 2),
-- mode = "contained", icon = "poi_parking_rect",
-- path = "/levels/west_coast_usa/facilities/garage.sites.json",
-- }See Also
- Big Map Marker - Related reference
- Crawl Marker - Related reference
- Drift Line Marker - Related reference
- Gameplay Systems Guide - Guide
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
Walking Marker
Reference for the walking marker class used by the POI/marker system to display interactive door icons when the player is on foot near buildings.