Rally Driveline Utility
Utility constants for the rally driveline spline system. Provides default values for spline width, RDP simplification tolerance, and subdivision parameters.
Utility constants for the rally driveline spline system. Provides default values for spline width, RDP simplification tolerance, and subdivision parameters.
Public API
| Constant | Type | Value | Description |
|---|---|---|---|
M.defaultSplineWidth | number | 10.0 | Default width for spline nodes |
M.defaultSimplificationTolerance | number | 1.0 | RDP simplification tolerance in meters |
M.minSplineDivisions | number | 10 | Minimum number of subdivisions per spline segment |
M.minSplineSpacing | number | 2.0 | Minimum distance between subdivided points in meters |
How It Works
These constants are consumed by DrivelineV3 and related spline processing code:
defaultSplineWidthis applied uniformly to all spline nodes (constant width)defaultSimplificationTolerancecontrols how aggressively the RDP algorithm reduces point count - lower values preserve more detailminSplineDivisionsandminSplineSpacingcontrol the density of Catmull-Rom subdivisions
Usage Examples
local DrivelineUtil = require('/lua/ge/extensions/gameplay/rally/driveline/util')
-- Use in spline processing
local tolerance = DrivelineUtil.defaultSimplificationTolerance
rdp.simplifyNodesWidthsNormals(nodes, widths, normals, tolerance)Notes
- These values represent sensible defaults for rally stage drivelines
- Changing
defaultSimplificationToleranceaffects the tradeoff between point count and shape accuracy minSplineSpacingof 2.0m produces dense enough output for smooth audio triggering along the route
See Also
- Rally Driveline Measurement - Related reference
- Rally Driveline Route - Related reference
- Rally Driveline V3 - Related reference
- Gameplay Systems Guide - Guide
Rally Driveline Point List
Container class for a series of points along a rally driveline path. Provides point creation, relationship management, normal calculation, length computation, nearest-point search, and debug rendering
Rally Loop Penalties
Calculates time control penalties for rally loop events. Determines if a driver arrived early, on-time, or late at a checkpoint and computes penalty amounts (+10 per minute deviation).