API ReferenceGE ExtensionsscenarioraceMarkers
Single Hologram Marker
A lightweight checkpoint marker that renders a single faded column at the waypoint center. Uses raycasting to snap to terrain and scales height with camera distance.
A lightweight checkpoint marker that renders a single faded column at the waypoint center. Uses raycasting to snap to terrain and scales height with camera distance.
Class API (OOP via metatable)
| Method | Signature | Description |
|---|---|---|
C:init | (id) | Initializes color, fade, mode state |
C:update | (dt, dtSim) | Per-frame: bobbing, distance-based fade/height, color lerp |
C:setToCheckpoint | (wp) | Raycasts to ground, positions column |
C:setMode | (mode) | Transitions mode, triggers color update |
C:setVisibility | (v) | Shows/hides the single column |
C:createMarkers | () | Spawns 1 TSStatic column |
C:clearMarkers | () | Deletes the column object |
C:show | () | Shows the marker (sets visibility to true) |
C:createObject | (shapeName, objectName) | Creates a TSStatic object for the marker |
Mode Properties
| Mode | Color (RGB) | scalarThin | Description |
|---|---|---|---|
default | {0, 0.4, 1} | 1.0 | Blue - normal |
next | {0, 0, 0} | 0.75 | Black - thinner |
start | {0.4, 1, 0.2} | 1.0 | Green |
recovery | {1, 0.85, 0} | 1.0 | Yellow |
final | {0.1, 0.3, 1} | 1.0 | Blue |
hidden | {1, 1, 1} | 0.0 | Zero scale = invisible |
How It Works
- Ground raycasting:
setToCheckpointcasts a ray (6m up, 25m down) at the waypoint center to find terrain. Disables forest collision during raycast. - Ground snap: If ground is found and within 1m of waypoint Z, uses ground position; otherwise uses waypoint position
- Bobbing: Column bobs vertically via
sin(timer * 0.333 * 2π) * 0.05 - Column height: Scales with distance:
inverseLerp(60, 180, distance)gives 0–20 units, base height of 1 - Fade: Column alpha fades from 0.15 to 1.0 between 60–120m distance, multiplied by mode alpha
- scalarThin: Modes control column X/Y scale;
hiddenuses 0 to completely hide - Column offset: Positioned 7m above ground for visibility
Usage Example
local createMarker = require("scenario/raceMarkers/singleHologramMarker")
local marker = createMarker(1)
marker:createMarkers()
marker:setToCheckpoint({
pos = vec3(100, 200, 50),
radius = 8,
normal = vec3(0, 1, 0)
})
marker:setMode('default')Key Notes
- Shape:
s_single_faded_column_rect.dae - Simplest ground-snapping marker - only 1 TSStatic object
- Uses
core_forest.getForestObject():disableCollision()during raycasts columnOffset = vec3(0, 0, 7)lifts the column above ground- 0.8s color lerp duration (longer than most other markers)
See Also
- Race Marker: Attention - Floating Arrow Checkpoint Marker - Related reference
- Race Marker: Crawl Marker - Arrow + Flag + Column Checkpoint - Related reference
- Race Marker: Cylinder - Base + Cylinder Checkpoint Marker - Related reference
- Scenario System Guide - Guide
Side Marker
A three-object checkpoint marker with a curved base and two faded column pillars positioned on each side of the waypoint. Columns scale with distance for far-range visibility.
Scenario Statistics
Comprehensive statistics system for scenarios. Tracks distance, altitude, speed, damage, time, and custom goals per vehicle. Calculates points, medals, and manages stat persistence for the end-of-race