API ReferenceGE ExtensionsscenarioraceMarkers
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.
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.
Class API (OOP via metatable)
| Method | Signature | Description |
|---|---|---|
C:init | (id) | Initializes fade distances, colors, object IDs |
C:update | (dt, dtSim) | Per-frame: distance fade, column scaling, base rotation |
C:setToCheckpoint | (wp) | Sets position/radius/normal, positions base and columns |
C:setMode | (mode) | Transitions mode, triggers color update |
C:setVisibility | (v) | Shows/hides base, left, and right objects |
C:createMarkers | () | Spawns 3 TSStatic objects (base, left column, right column) |
C:clearMarkers | () | Deletes objects by stored IDs |
C:show | () | Shows the marker (sets visibility to true) |
C:createObject | (shapeName, objectName) | Creates a TSStatic object for the marker |
Spawned Objects (3 total)
| Object | Shape | Purpose |
|---|---|---|
| Base | checkpoint_curve_base.dae | Ground-level curved base |
| Left column | single_faded_column.dae | Left side pillar |
| Right column | single_faded_column.dae | Right side pillar |
Mode Colors
| Mode | Color | Base Color |
|---|---|---|
default | {1, 0.07, 0} | {1, 1, 1} |
next | {0, 0, 0} | {0, 0, 0} |
start | {0.4, 1, 0.2} | {1, 1, 1} |
recovery | {1, 0.85, 0} | {1, 1, 1} |
final | {0.1, 0.3, 1} | {1, 1, 1} |
hidden | {0, 0, 0} | {0, 0, 0} |
How It Works
- Side positioning: Columns placed at
pos ± side * radius, whereside = normal:cross(zVec) - Distance-based alpha: Fades from
fadeNear(1m) tofadeFar(50m) withminAlphaof 0.25 - Column scaling: Radius grows with
distance * 0.03, height grows viainverseLerp(60, 180, distance) - Base scaling: Height clamps between
radiusandradius * 3based on distance (10–40m range) - Camera rotation: Base and side normal rotate to face camera when beyond
radius * 1.5 - Column offset: Left/right columns offset by
vec3(0, 0, -10)(below ground anchor point) - Color lerp: 0.3s transition for both pillar color and base color
Usage Example
local createMarker = require("scenario/raceMarkers/sideMarker")
local marker = createMarker(1)
marker:createMarkers()
marker:setToCheckpoint({
pos = vec3(100, 200, 50),
radius = 8,
normal = vec3(0, 1, 0),
fadeNear = 5,
fadeFar = 60,
minAlpha = 0.3
})
marker:setMode('default')Key Notes
- Includes
recoverymode (yellow) for recovery points - Base alpha is half of column alpha (
currentColor.w * 0.5) - Uses pre-allocated
vec3locals for performance (playerPosition,scale,markerOffset) - Column position has a -10 Z offset for the marker offset below the waypoint
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 Hologram Marker
A three-part checkpoint marker with a curved base, active side hologram, and a distant hologram that fades in at range. Blends between close and far representations based on camera distance.
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.