Rally Editor - Driveline Tab
Sub-module for editing the stage driveline - an editable spline that defines the driving path through a rally stage.
Sub-module for editing the stage driveline - an editable spline that defines the driving path through a rally stage.
Overview
Provides a complete driveline editing workflow: load from recording, existing final driveline, or race path; edit via interactive spline with node insertion/deletion/dragging; simplify with RDP algorithm; generate final driveline points; save to file. Includes experimental buffer zone visualization.
Class Methods
| Method | Signature | Description |
|---|---|---|
C:init | (rallyEditor) | Initializes state, creates empty DrivelineV3 |
C:setPath | (path) | Sets notebook path, auto-loads final driveline if available |
C:selected / C:unselect | () | Tab activation/deactivation hooks |
C:draw | (mouseInfo, dtReal, dtSim, dtRaw) | Renders the full UI (source selection → editing → saving) |
C:drawDebugEntrypoint | (mouseInfo) | 3D rendering: raw points, spline, final driveline, buffer zone |
C:loadFromRecording | () | Loads raw driveline from recording file |
C:loadFromFinal | () | Loads existing final driveline or creates blank |
C:loadFromRace | () | Creates driveline from race AI path |
C:saveFinalDriveline | () | Saves final driveline points to JSON |
C:handleSplineInteraction | () | Mouse/keyboard input for node manipulation |
C:createDrivelineFromSpline | () | Generates final points from the spline curve |
C:calculateRaceDistance | () | Measures distance between start/finish via RallyManager |
C:generateBuffer | () | Creates spatial buffer zone around driveline |
C:isPointInBuffer | (point) | Checks if a point falls within the buffer zone |
Spline Interaction
| Action | Input | Description |
|---|---|---|
| Select node | Click on node | Highlights and selects for editing |
| Drag node | Click+drag on node | Moves node with terrain Z-snapping |
| Insert node | Click on curve | Inserts new node at click position |
| Add to end | Click free space | Adds node to nearest spline endpoint |
| Delete node | DELETE key | Removes selected node (min 2 nodes) |
Load Sources
| Source | Description |
|---|---|
| Recording | Raw recorded driving data with simplification tolerance slider |
| Existing Final | Previously saved driveline (or blank if none exists) |
| Race Path | Generated from race AI detailed path |
Properties
| Property | Type | Description |
|---|---|---|
speedLimitKph | float | Maximum speed limit for the driveline section |
Notes
- Uses
DrivelineV3module for spline math and rendering. - RDP simplification with configurable tolerance (0.1–6.0m for recordings, fixed 9.0m for manual).
- Full undo/redo for all spline edits via deep-copy snapshots.
- Final driveline saved as compact
{version, points, properties}JSON. - Buffer zone uses bounding box quick-reject + radius check for spatial queries.
- Node hit detection uses distance-adaptive tolerance for comfortable interaction.
Module Variables
windowDescription(string) - Module variable.
Functions
formatDistance(dist)
Handles format distance.
dist(any)
Returns: boolean - false
hasRecording()
Checks if has recording.
Returns: boolean - false
hasFinalDriveline()
Checks if has final driveline.
Returns: boolean - false
getDrivelineLength()
Returns the driveline length.
Returns: self.drivelineV3:createDrivelineFromSpline()
getDrivelinePointCount()
Returns the driveline point count.
Returns: self.drivelineV3:createDrivelineFromSpline()
updateSplineGeometry()
Updates spline geometry.
Returns: self.drivelineV3:createDrivelineFromSpline()
deepCopySpline()
Handles deep copy spline.
Returns: self.drivelineV3:createDrivelineFromSpline()
undoSplineEdit(data)
Handles undo spline edit.
data(table)
Returns: self.drivelineV3:createDrivelineFromSpline()
redoSplineEdit(data)
Handles redo spline edit.
data(table)
Returns: boolean - false
Module Variables
windowDescription(string) - Module variable.
Functions
formatDistance(dist)
Handles format distance.
dist(any)
Returns: boolean - false
hasRecording()
Checks if has recording.
Returns: boolean - false
hasFinalDriveline()
Checks if has final driveline.
Returns: boolean - false
getDrivelineLength()
Returns the driveline length.
Returns: self.drivelineV3:createDrivelineFromSpline()
getDrivelinePointCount()
Returns the driveline point count.
Returns: self.drivelineV3:createDrivelineFromSpline()
updateSplineGeometry()
Updates spline geometry.
Returns: self.drivelineV3:createDrivelineFromSpline()
deepCopySpline()
Handles deep copy spline.
Returns: self.drivelineV3:createDrivelineFromSpline()
undoSplineEdit(data)
Handles undo spline edit.
data(table)
Returns: self.drivelineV3:createDrivelineFromSpline()
redoSplineEdit(data)
Handles redo spline edit.
data(table)
Returns: boolean - false
See Also
- Rally Editor - Measurements Tab - Related reference
- Rally Editor – Mission Settings Tab - Related reference
- Rally Editor – Notebook Info Tab - Related reference
- World Editor Guide - Guide