Traffic Exclusion Zones
Creates traffic exclusion zones around rally stage infrastructure (start positions, pathnodes) to prevent AI traffic from interfering with rally routes. Zones are applied to the navgraph via `map.setT
Creates traffic exclusion zones around rally stage infrastructure (start positions, pathnodes) to prevent AI traffic from interfering with rally routes. Zones are applied to the navgraph via map.setTrafficExclusionZones().
Exports
| Function | Signature | Returns | Description |
|---|---|---|---|
M.createZones | (missions) | table[] | Creates exclusion zones for given missions (or current editor mission) |
How It Works
Zone Creation
Each zone is a sphere defined by {pos = vec3, radius = 10}.
For rallyStage missions:
- Zones at every start position
- Zones at every pathnode (full route coverage)
For rallyRoadSection missions:
- Zones at every start position only
Mission Resolution
If no missions are provided:
- Falls back to current mission from
editor_rallyEditor.getMissionId() - Looks up mission data via
gameplay_missions_missions.getMissionById() - Unsupported mission types are logged and skipped
Race Path Loading
Loads race.race.json from the mission folder, deserializes via the race path module to access start positions and pathnodes.
Integration with DevTools
Called from the rally DevTools panel:
local TrafficExclusion = require('/lua/ge/extensions/gameplay/rally/trafficExclusion')
-- Create zones from specific missions
local missions = { gameplay_missions_missions.getMissionById("rally_stage_01") }
local zones = TrafficExclusion.createZones(missions)
-- Apply to navgraph
map.setTrafficExclusionZones(zones)
map.reset() -- Reloads navgraph with zones appliedZone Structure
-- Each zone in the returned array
{
pos = vec3(1500, 1600, 140),
radius = 10 -- default radius in meters
}See Also
- Rally Audio Manager - Related reference
- Rally Camera Path Player - Related reference
- Rally Client - Related reference
- Gameplay Systems Guide - Guide
Snap-to-Road
Provides snap-to-road functionality in the world editor's rally editor. Wraps a driveline (linked list of points) with spatial queries, point partitioning, filtering, camera path playback, and debug v
Rally Utility
Central utility module for the rally system. Provides constants, file path helpers, mission detection, notebook loading, corner call classification, string utilities, vehicle geometry helpers, and tim