Road Segment Creator

Road Segment Creator is a tool for creating and customizing a RoadSegment

How To Use

Youtube tutorial.

  1. Create a RoadSegment.

  2. Place the segment at the desired position.

  3. By default, RoadSegment prefab contains RoadSegmentCreator component.

  4. Select the Road segment type depending on the shape of your intersection.
    _images/RoadsegmentCreatorGeneralSettings_2.png
  5. In the other tab, you can convert any Standard shape segment to a Custom segment for more flexibility (also check out the new Auto-Crossroads feature for automatic crossroad generation).

  6. In the general settings, adjust lane count, lane width, crossroad width.

  7. In the custom settings, adjust settings according its type.

  8. In the pedestrian node settings, you can customize pedestrian crosswalks.

  9. In the light settings, you can set offsets of the traffic lights or disable them.

  10. In the path settings, you can enable traffic node handles, adjust speed limit & waypoints of the paths of the created intersection.

  11. Add RoadSegment to the RoadParent as children.

Standard Shapes

Youtube tutorial.

Default Crossroad

_images/RoadsegmentCreatorDefaultCrossroadSettings.png
Direction count : number of sides of the crossroad.
_images/RoadSegmentDefault.png

Example.

Turn Road

_images/RoadSegmentTurnRoadSettings.png
Node 1 offset : node 1 offset on the X-axis.
Node 2 offset : node 2 offset on the X-axis.
Additional local angle 1 : additional node 1 rotation angle.
Additional local angle 2 : additional node 2 rotation angle.
_images/RoadSegmentTurnRoad.png

Example.

Straight Road

_images/RoadSegmentStraightSettings.png
Node 1 offset : node 1 offset on the X-axis.
Node 2 offset : node 2 offset on the X-axis.
Traffic node height 1 : node 1 offset on the Y-axis.
Traffic node height 2 : node 2 offset on the Y-axis.
_images/RoadSegmentStraight.png

Example.

Merge Crossroad

_images/RoadSegmentTransitionCrossroadSettings.png
Direction count : number of sides of the crossroad.
Sub-lane count : number of sub-lanes (a sub-lane is a lane with a different number of lanes than the main lane).
SubTrafficNode distance from center : distance between the SubTrafficNode (node that contains a sub-lane) and the center of the segment.
_images/RoadSegmentTransitionCrossroad.png

Example.

Merge Straight Road

_images/RoadSegmentTransitionStraightRoadSettings.png
Sub-lane count : number of sub-lanes (a sub-lane is a lane with a different number of lanes than the main lane).
Node 1 offset : node 1 offset on the X-axis.
Node 2 offset : node 2 offset on the X-axis.
Traffic node height 1 : node 1 offset on the Y-axis.
Traffic node height 2 : node 2 offset on the Y-axis.
_images/RoadSegmentTransitionStraightRoad.png

Example.

Merge Crossroad To Oneway Road

_images/RoadSegmentTransitionCrossroadToOneWaySettings.png
Direction count : number of sides of the crossroad.
Sub-lane count : number of sub-lanes (a sub-lane is a lane with a different number of lanes than the main lane).
SubTrafficNode distance from center : distance between the SubTrafficNode (node that contains a sub-lane) and the center of the segment.
Is enter of oneway : if it is on, it is the start of one-way traffic, if it is off, it is the end of one-way traffic.
_images/RoadSegmentTransitionCrossroadToOneWay.png

Example.

Oneway Straight

_images/RoadSegmentOneWayStraightSettings.png
Node 1 offset : node 1 offset on the X-axis.
Node 2 offset : node 2 offset on the X-axis.
Traffic node height 1 : node 1 offset on the Y-axis.
Traffic node height 2 : node 2 offset on the Y-axis.
Should revert direction : direction of the crossroad lanes will be reversed.
_images/RoadSegmentOneWayStraight.png

Example.

Oneway Turn

_images/RoadSegmentOneWayTurnSettings.png
Node 1 offset : node 1 offset on the X-axis.
Node 2 offset : node 2 offset on the X-axis.
Additional local angle 1 : additional node 1 rotation angle.
Additional local angle 2 : additional node 2 rotation angle.
Should revert direction : direction of the crossroad lanes will be reversed.
_images/RoadSegmentOneWayTurn.png

Example.

Custom Straight Road

Creator for creating straight roads of any shape.

Youtube tutorial.

How To Use

  1. Place the custom straight segment where you want it.

  2. Place the traffic nodes at the start and the end of the path (or expand the road by holding left-shift key and clicking the left-mouse button).

  3. Rotate the TrafficNodes in the direction of the route (make sure that the rotation of the nodes is set correctly).

  4. Adjust the number of lanes and the speed limit of the segment.

  5. If necessary, add more additional nodes to the paths (by pressing + in the scene) [optional step].

  6. Rotate the nodes of the paths according to the direction of the path [optional step].

  7. Snap TrafficNodes to the surface by pressing the Snap To Surface button if necessary [optional step].

  8. Complete all the default steps.

Settings

Custom Settings

_images/RoadSegmentCustomStraightCustomSettings.png
One way : segment contains only one-way paths.
Lock Y axis move : lock the Y axis to move the nodes.
Show Y position : show Y position of the nodes.

Snap Node Settings

_images/RoadSegmentCustomStraightSnapNodeSettings.png

Info.

Snap Surface Settings

_images/RoadSegmentCustomStraightSnapSurfaceSettings.png
Snap surface offset : offset between snap point and the node (Y axis).
Node Buttonswhich node you want to snap to.
  • All

  • Node1

  • Node2

Buttons:
  • Snap to surface: snap selected nodes to the surface.

Snap Line Settings

Creates additional path nodes along the curved meshes of the collider to make the path follow the shape of the collider (v 1.0.4+).

_images/RoadSegmentCustomStraightSnapLineSettings.png
Angle threshold : minimum angle between normal faces to create new path nodes.
Min waypoint offset : min offset between generated path nodes.
Snap surface offset : offset between snap point and the node (Y axis).
_images/SnapLineExample.gif

Example.

Path Settings

_images/RoadSegmentCustomStraightPathSettings.png
Show edit buttons path nodes : on/off edit (add & remove) button paths of node.
Show traffic node handles : on/off traffic node position handles.
Show traffic node forward : on/off display of node’s forward direction.
Speedlimit : speed limit for all paths of the segment.

Examples

_images/RoadSegmentCustomStraight.png

Source segment example.

_images/RoadSegmentCustomStraight2.png

Complex shape example.

_images/RoadSegmentCustomStraightSnapExample.png

Surface snapping example.

Custom Segment

Creator for creating segments of any shape and complexity.

Youtube tutorial.

How To Use

  1. Place the custom segment where you want it.

  2. Choose one of the following methods to create your intersection or layout:

Option A: Manual Connection (Fine-tuning)

Option B: Auto-Crossroads Mode (From Scratch)

  • Create and arrange your child Traffic nodes inside this custom segment at the entry and exit points of the intersection.

  • Open the Path settings tab and change Additional Settings to AutoCrossroad.

  • Press Clear to wipe any existing paths, then click Create to automatically calculate crossroad geometry and build all traffic paths.

Option C: Intersection Creation Mode (From Existing Scene Roads)

Note

You do not need to manually add or create new Traffic Nodes for this method. The creator will automatically generate internal nodes based on your scene selection.

  • Open the Path settings tab and set Additional Settings to IntersectionCreation.

  • In the Scene View, select two or more existing TrafficNodes belonging to different independent roads already placed on your scene.

  • Configure the merging behavior in the inspector:

    • Auto Merge Nodes: Terminal nodes of your straight roads will automatically align and link for a seamless mesh transition.

    • Auto Generate Crossing: Automatically triggers path solving between the chosen roads.

  • Click the Create button. The component will automatically match the node count, clone all settings from the selected scene nodes, align crosswalks, and build the intersection paths.

  1. Complete all the default steps.

    Note

    You can convert any default template to Custom Segment in the Other settings tab.

Settings

New Node Settings

_images/RoadSegmentCustomNewNodeUniqueSettings.png
Custom settings : on/off custom settings for advanced node customization.
New node settings type [custom settings enabled] new TrafficNode will be created like:
  • Prefab : new prefab.

  • Unique : created with unique defined settings.

  • Copy last : will be created with the settings of the last created node.

  • Copy selectedwill be created with the settings of the selected node.
    • Copy node index

Custom Path Settings

_images/RoadSegmentNodeHandles.png
Show traffic node handles : on/off handles of TrafficNodes
Show traffic node forward : on/off display of TrafficNode forwading.

Additional Settings

Extrude Lane

_images/ExtrudeLaneSettings.png

How to use:

  1. Drag the green sphere from where you want the new lane to start.

  2. Drop the cursor where you want the lane to end.

  3. Adjust the position handle of the new path.

  4. Press E key or press Create button in the inspector to create new lane.

_images/ExtrudeLaneExample.gif

Example.

Custom Settings

_images/RoadSegmentCustomCustomSettings.png
Lock Y axis move : lock the Y axis to move the nodes.
Show Y position : show Y position of the nodes.

Snap Node Settings

_images/RoadSegmentCustomSnapNodeSettings.png

Info.

Custom TrafficNode Editor Window

Window that you can configure each TrafficNode settings. Custom settings should be enabled.

_images/RoadSegmentCustomTrafficNodeEditorWindow.png

Examples

_images/RoadSegmentCustomExample.png

Example.

Settings Description

Snap Node Settings

Snap object type:
  • All : snap TrafficNode & Path node.

  • Traffic node : only TrafficNode.

  • Path node : only Path node.

Auto-snap position on/off position snapping.
  • Add half offset : the snapped object is shifted by half of the set snapping size.

Auto snap custom size : snapping value.
Auto round rotation:on/off rotation snapping.
  • Round angle : snapping angle value.

Roundabout

The Roundabout component works in tandem with the RoadSegmentCreator to automatically generate complex circular intersections. The tool supports two primary workflows: creating a standard roundabout from scratch using purely inspector-defined metrics, or generating a custom roundabout fitted directly onto the existing traffic nodes of approaching roads.

Method 1. Inspector Only Mode

This method is ideal for creating a standalone roundabout “from scratch” in an empty area of the scene, where you manually define the dimensions and the number of connection points.

  1. Create a RoadSegment.

  2. In the RoadSegmentCreator component, select Roundabout as the road segment type (the Roundabout script component will be attached automatically).

  3. In the Current Generation Type dropdown, select InspectorOnly.

  4. Configure the base parameters of the roundabout in the Inspector:

    • Entrance Node Count: The number of entry/exit roads connecting to the roundabout (ranges from 3 to 10).

    • Outer Radius: The distance from the center to the entrance/exit nodes.

    • Inner Radius: The radius of the inner central island.

    • Inner Lane Count & Lane Width: The number and width of the lanes inside the circle.

  5. Press the Create button to generate the road layout.

  6. If you need to fine-tune the layout, you can manually move elements directly in the Scene View using Gizmos handles by selecting the appropriate Active Handle mode.

Method 2. Custom Mode (Based on Existing Roads)

This method allows you to seamlessly integrate a roundabout into your current road network. Instead of creating a standalone asset and trying to snap it manually, the tool uses the final Traffic Nodes of the straight roads that approach the intersection as anchor points.

  1. Create a RoadSegment and set its road segment type to Roundabout via the RoadSegmentCreator.

  2. Set the Current Generation Type parameter to Custom in the Roundabout component.

  3. Enable the Show Buttons option in the editor to display node selection overlay elements in the Scene View.

  4. Look at the Scene View: each available traffic node will have a “T” button floating above it. Simply click the “T” button on the final nodes of the approaching roads to automatically add them to the selection (the button label changes to “T-” once selected, allowing you to remove the node just as easily).

  5. Choose how the center of the circle should be defined via the Center Type option:

    • Current: The current transform position of the Roundabout object is used as the center.

    • Calculate: The system automatically calculates the geometric intersection center based on the perpendiculars and directions of the approaching roads.

  6. Enable the Calculate Radius option to let the system automatically compute the ideal inner and outer circle radii based on the distance to the closest selected node.

  7. Enable the Merge Nodes option. This ensures that the newly generated roundabout entry and exit paths will automatically snap and stitch onto your pre-existing traffic nodes.

  8. Press the Create button. The system will automatically sort the nodes clockwise to prevent any path overlaps or intersection conflicts, and seamlessly link the approaching streets into the loop.

Advanced Geometry & Customization

Once a roundabout is generated (especially useful for tweaking the layout in Custom mode), you can utilize advanced parameters to deform and fine-tune its geometry:

  • Position Fine-Tuning: Adjust the Additive Circular Position and Additive Offset parameters for individual entry points to slide them along the circle’s perimeter or shift their precise distance from the center.

  • Roundabout Types:

    • SingleInnerNode: Generates one inner node per circle segment.

    • DoubleInnerNodes: Generates two inner nodes per segment, providing a smoother and more natural curvature for vehicle paths.

  • Pedestrian Ring Settings: By enabling the Generate Outer Pedestrian Ring option, the tool automatically constructs a continuous sidewalk loop around the outer radius, linking existing crosswalks together into a unified pedestrian network.

Components

General settings

_images/RoadsegmentCreatorGeneralSettings_2.png
Lane count : number of lanes.
Lane width : lane width.
Crossroad width : distance between traffic nodes.
Path corner offset : offset to change the rotation angle of curved paths.

Custom settings

Custom settings.

Light settings

_images/RoadsegmentCreatorLightSettings.png

Youtube tutorial.

How To Use

  1. Turn on traffic light option.

  2. Select Light prefab type.

  3. Set the traffic light offset or enable Light handle type.

  4. If you want to configure the traffic lights individually, select the Node button with the appropriate index.

Traffic lights

Show light indexes : on/off display light TrafficLightHandler index around traffic nodes and traffic lights in the scene.
Min TrafficNodes count for add light : minimum number of traffic nodes in the segment to add traffic light.
Add traffic light : add traffic light to the segment.
Light handle type:
  • None

  • Position : enable position handle for traffic lights.

  • Rotation : enable rotation handle for traffic lights.

Selected light prefab typeprefab of the traffic light to be added [can be changed in creator settings].
  • Oneway

  • Two way

  • Four way

Light location :
Traffic lights offset : local traffic light offset relative to traffic node.
Light angle offset settings:
  • Angle offset : local rotation angle of the traffic light.

  • Flip index : switches to the opposite light index in the traffic light.

Pedestrian lights

Add pedestrian lights : add pedestrian light to the segment.
Pedestrian light offset : local pedestrian light offset relative to traffic node
Pedestrian angle offset : pedestrian light rotation angle offset.

Path settings

_images/RoadsegmentCreatorPathSettings.png

Node selection panel

How to customize path:
  1. Select TrafficNode on the inspector panel.

  2. Select desired path on the inspector panel (it will be highlighted in the scene).

  3. Adjust the position of the path nodes (make sure path handles is enabled).

  4. Press Open Path Settings button to customize Path settings window.

Road settings

StraightRoad settings: [settings for straight paths of the segment]
  • Waypoint Straightroad count

  • Straight road path speed limit

  • Straight road priority

TurnRoad settings: [settings for turn paths of the segment]
  • Turn curve type

  • Waypoint turn curve count

  • Turnroad path speed limit

  • Turnroad priority

Scene settings

Show path handleson/off position handles in the scene.
  • Show edit buttons path nodes : on/off add & remove buttons nodes in the scene.

Show waypointson/off visual circle position of the waypoint in the scene.
  • Show waypoints info : on/off info of waypoints (local index, speedlimit).

Turn connection settings

Custom node turn settings : on/off the turn settings for each traffic node.
Left turn count : number of left turns from the traffic node.
Right turn count : number of right turns from the traffic node.
Lane left turn connection count : number of connections to the left from the lane traffic lane.
Lane right turn connection count : number of connections to the right from the lane traffic lane.

Segment handler settings

_images/RoadsegmentCreatorSegmentHandlerSettings.png
Show segment position handle : on/off position handle for segment.
Snap segment position : on/off snap segmant position.
Add half offset : the snapped object is shifted by half of the set snapping size.
Custom snap size : snapping value.
Snap surface offset : snap surface offset.
Snap layer mask : snap layermask.
Snap segment to surface : snap the segment to the surface.

Other settings

_images/RoadsegmentCreatorOtherSettings.png
Merge segment : opens the merge segment tool.
Convert to custom : converts the current segment to custom segment.
Save prefab paths : segment save prefab path.
Save to prefab : save segment to prefab.

Buttons

Rotate -90°/90° : rotate segment by 90° degree.
Recreate : recreate segment.
Clear : clear segment.

Hotkeys

Capslock : rotate segment by 90° degree.

Auto Crossroad

For automatic generation of custom crossroads, use this feature.

How To Use

  1. Create a Custom road segment.

    _images/AutoCrossroad0.png
  2. Open the Path Settings tab & enable the Auto-Crossroads option in the Additional Settings dialog.

    _images/AutoCrossroad1.png
  3. Press the Clear button to delete existing paths.

  4. Place Traffic nodes at the entrances/exits of the intersection.

    _images/AutoCrossroad2.png
  5. Press the Create button.

    _images/AutoCrossroad3.png
  6. If you want to avoid connection for certain Traffic nodes select indexes according to scene indexes & press Add button, then press Create button again.

  7. For example 1-3 & 3-1 nodes.
    _images/AutoCrossroad4.png
  8. 1-3 & 3-1 nodes no longer connected.

    _images/AutoCrossroad5.png

    Example result.

  9. If you are missing a connection, use the Path Creator to add missing paths.

Dead End

Destroy

If you want traffic to be destroyed at the dead end (e.g. when it drives beyond the scene), enable the Destroy vehicle type in the Traffic node.

U Turn

To create u turn path:

  1. Open Path Creator tool.

  2. Select desired Traffic node for u turn.

  3. Enable U turn option in the Node settings tab.

  4. Enable Connect same side option & set Source node side to External side.

  5. Press Create button.