API ReferenceGE ExtensionseditorraceEditor
Race Editor - Segments Tab
Sub-module for creating and editing segments that connect pathnodes in a race path.
Sub-module for creating and editing segments that connect pathnodes in a race path.
Overview
Manages directional connections between pathnodes. Segments define the race route and support three modes: waypoint (default), capsules (custom collision volumes), and navpath (navigation graph path). Includes gizmo editing for capsule points.
Class Methods
| Method | Signature | Description |
|---|---|---|
C:init | (raceEditor) | Initializes with parent editor reference |
C:setPath | (path) | Sets the race path |
C:selected / C:unselect | () | Activates/deactivates segment display |
C:selectSegment | (index) | Selects a segment, enables source/target shortcuts |
C:selectCapsule | (index) | Selects a capsule point within a segment |
C:draw | (mouseInfo) | Main loop - gizmo, input, UI rendering |
C:input | () | Alt=set source, Shift=set target, Ctrl=insert capsule |
C:beginDrag / C:dragging / C:endDragging | () | Gizmo manipulation for capsule points |
C:drawSegmentList | () | List+detail panel with from/to selectors and capsule editor |
C:addHistory | (name, old) | Commits an undo/redo action for the current segment |
Segment Properties
| Property | Type | Description |
|---|---|---|
name | string | Display name |
from | int | Source pathnode ID |
to | int | Target pathnode ID |
mode | string | "waypoint", "capsules", or "navpath" |
capsulePoints | array | List of {pos, radius} for capsule mode |
Capsule Editing
- Select: Click on capsule points in viewport or list
- Insert: Ctrl+click on midpoint between two capsule points
- Add Before/After: Buttons in the detail panel
- Remove: Removes selected capsule point
- Gizmo: Translate moves position, Scale adjusts radius
Notes
- Invalid segments (missing from/to nodes) show
(!)in the list. navpathmode is only available when both endpoints are navgraph nodes.- All segment changes support full undo/redo via serialization snapshots.
Module Variables
windowDescription(string) - Module variable.
Functions
updateTransform()
Updates transform.
Returns: end
mouseDistanceTo(point, mouseInfo)
Handles mouse distance to.
point(any)mouseInfo(any)
Returns: -1
Module Variables
windowDescription(string) - Module variable.
Functions
updateTransform()
Updates transform.
Returns: end
mouseDistanceTo(point, mouseInfo)
Handles mouse distance to.
point(any)mouseInfo(any)
Returns: -1
See Also
- Race Editor - Pacenotes Tab - Related reference
- Race Editor - Pathnodes Tab - Related reference
- Race Editor - Start Positions Tab - Related reference
- World Editor Guide - Guide