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.
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.
Class API (OOP via metatable)
| Method | Signature | Description |
|---|---|---|
C:init | (id) | Initializes blend state, alpha, colors, object references |
C:update | (dt, dtSim) | Per-frame: distance blend, close/far alpha, rotation, color |
C:setToCheckpoint | (wp) | Sets position/radius/normal, swaps shape per mode |
C:setMode | (mode) | Transitions mode, swaps side shape, triggers color blend |
C:setVisibility | (v) | Shows/hides base, sides, and distant objects |
C:hide / C:show | () | Also manages oldColor/newColor for fade transitions |
C:createMarkers | () | Spawns 3 TSStatic objects (base, sides, distant) |
C:clearMarkers | () | Deletes all spawned objects |
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 |
| Sides | checkpoint_curve_active.dae or _finish.dae | Close-range active hologram |
| Distant | checkpoint_curve_distant.dae | Far-range simplified hologram |
Mode Colors & Shapes
| Mode | Color | Shape |
|---|---|---|
default | {1, 0.07, 0} | checkpoint_curve_active.dae |
lap | {0.4, 1, 0.2} | checkpoint_curve_finish.dae |
final | {0.1, 0.3, 1} | checkpoint_curve_finish.dae |
hidden | {0, 0, 0} | checkpoint_curve_active.dae |
How It Works
- Distance blending: Uses a
blendStatemachine (close/far) with hysteresis betweenfadeNear(50m) andfadeFar(75m) - Close alpha: Base at 0.75 opacity, sides at 0.95
- Distant alpha: Smoothly transitions via
blendTimer / blendDuration(0.8s) - Side scaling: Uses
smootherstepfor smooth lerp between close and distant scale - Camera-facing rotation: Base and sides rotate to face camera when distance >
radius * 1.5 - Shape swapping: Lap/final modes use
_finish.daeshape, swapped viapreApply/postApply - Hidden fade: Alpha lerps to 0 when entering hidden mode, lerps from 0 when leaving
Usage Example
local createMarker = require("scenario/raceMarkers/sideHologramMarker")
local marker = createMarker(1)
marker:createMarkers()
marker:setToCheckpoint({
pos = vec3(100, 200, 50),
radius = 10,
normal = vec3(0, 1, 0),
mode = 'default'
})
marker:setMode('default')Key Notes
- Shape paths under
art/shapes/interface/sideMarker/ distanceScale = 4withsideToDistantRatiofor scaled transition- Base, sides, and distant all scale to waypoint radius
- Blending uses separate
blendTimerindependent ofcolorTimer
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 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
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.