road
Since 0.6
A road: a ribbon with kerbs, barriers and trigger gates built from a .road.json file, with trimesh colliders and a centreline scripts can read (ctx.world.road).
Works in a scene with no terrain. The entity's transform places the road; its parts are entities placed at it (not parented) <id>-surface, <id>-barrier and <id>-gate-<n>.
Use it in a scene entity's components list as { "type": "road", … }. The contract writes the fields flat and refuses unknown keys.
Fields
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
source | string | yes | Project-relative .road.json file. | ||
material | PhysicsMaterial | no | Physics material of the road surface collider (grip). Default: the engine's default. | ||
barrierMaterial | PhysicsMaterial | no | Physics material of the barrier colliders (bounce). Default: the engine's default. |
Rules that can refuse it
road-material-unknownroad-source-invalidroad-source-missingroad.atterrain/road-buried