Side Column Marker
The most complex race marker. Renders a full gate structure with left/right pillars, cones at ground level, tall distance columns, ground-anchoring cylinders, and a directional arrow. Uses raycasting
The most complex race marker. Renders a full gate structure with left/right pillars, cones at ground level, tall distance columns, ground-anchoring cylinders, and a directional arrow. Uses raycasting to snap to terrain.
Class API (OOP via metatable)
| Method | Signature | Description |
|---|---|---|
C:init | (id) | Initializes all object IDs, color buffers, mode state |
C:update | (dt, dtSim) | Per-frame: bobbing, color lerp, scale/position of 9 objects |
C:setToCheckpoint | (wp) | Raycasts to ground, positions all elements, sets rotations |
C:setMode | (mode) | Transitions mode, updates all object colors |
C:setVisibility | (v) | Shows/hides all 9 TSStatic objects |
C:createMarkers | () | Spawns all 9 objects (pillars, cones, columns, cylinders, arrow) |
C:clearMarkers | () | Deletes all 9 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 (9 total)
| Object | Shape | Purpose |
|---|---|---|
| Left/Right Pillar | s_mm_gate_pillar_left/right.dae | Main gate posts |
| Left/Right Column | s_single_faded_column_rect.dae | Tall distance markers |
| Left/Right Cone | s_mm_gatecone.dae | Ground-level cones |
| Left/Right Cylinder | track_editor_marker.dae | Ground-to-cone anchors |
| Arrow | s_mm_arrow_floating.dae | Points toward next waypoint |
Mode Properties
| Mode | Color (RGB) | scalarThin | Description |
|---|---|---|---|
default | {0, 0.4, 1} | 1.0 | Blue - normal checkpoint |
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 - recovery point |
hidden | {1, 1, 1} | 0.0 | White, zero scale = invisible |
How It Works
- Ground raycasting:
setToCheckpointcasts rays downward (6m up, 25m down) at left/right positions to find terrain height. Disables forest collision during raycasts. - Pillar positioning: Pillars are placed halfway between ground hit and waypoint height, offset by
CONE_HEIGHT(1m) - Cone scaling: Cones scale vertically based on pillar offset + bobbing
- Cylinder anchors: Thin cylinders stretch from ground to cone position
- Column height: Scales with camera distance via
inverseLerp(60, 180, distance)for far visibility - Bobbing: All elements bob via
sin(timer * freq * 2π) * amplitude - Arrow direction: Points toward
wp.nextPosusingquatFromDir - Color lerp: 0.8s transition with
pillarColor(instanceColor) andpillarColor1(instanceColor1)
Usage Example
local createMarker = require("scenario/raceMarkers/sideColumnMarker")
local marker = createMarker(1)
marker:createMarkers()
marker:setToCheckpoint({
pos = vec3(100, 200, 50),
radius = 8,
normal = vec3(0, 1, 0),
nextPos = vec3(150, 250, 50) -- arrow points here
})
marker:setMode('default')Key Notes
- Default marker for the race system (
race_marker.luadefaults to this) - Uses
Engine.castRayfor ground detection with forest collision disabled scalarThinproperty allows modes to control pillar/cone thickness (hidden = 0)- Fade distance: columns fade between 60–120m for visibility
- 9 TSStatic objects per marker - most resource-intensive marker type
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
Ring Marker - 3D Ring Checkpoint Marker
A race checkpoint marker that renders a 3D ring (hoop) at the waypoint position. Supports normal/up orientation, scales to waypoint radius, and swaps between regular and finish ring shapes based on mo
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.