Traffic Node

Traffic node is a set of traffic node entities that are connected to other traffic node entities by a :ref:`path <path>

Settings

Cached

_images/TrafficNode.png
Traffic light crossroad : the crossroad to which the node belongs.
Traffic light handler : traffic light that the traffic node is linked (TrafficLightHandler).

Lane Data

_images/TrafficNode2.png
Lanes : right side lanes (to connect TrafficNodes within a RoadSegment).
External lanes : left side lanes (to connect nodes in external RoadSegments) (additonal info).

Settings

_images/TrafficNode3.png
Lane count : number of lanes.
Lane width : lane width.
Chance to spawn : chance of the vehicle spawning in the node.
Weight : weight of the node for route selection by traffic.
Custom achieve distance : custom distance to achieve a node (if 0 value default value will be taken).
Capacity : capacity of the nodes (used for parking, bus station, etc…).
Light type:
  • Right : right-hand lanes have traffic lights.

  • Left : left-hand lanes have traffic lights.

  • Right and left : right and left lanes have traffic lights.

Traffic node type:
  • Default

  • Parking : node where cars are parked (read more parking states).

  • Traffic public stop : node where public traffic stops to pick up passengers.

  • Destroy vehicle : node where the vehicle entity is destroyed (useful for nodes outside the map).

  • Traffic area : TrafficArea node.

  • Idle : node where the vehicle is idling.

Is one way : all lanes are one-way traffic lanes (more info).
Is end of one way : node ends one-way traffic for this RoadSegment (more info).
Lock path auto creation : on/off prevent auto path creation (more info).
Auto path is created : auto path is created (more info).

Buttons

Connect : node will try to connect to other nodes if no external paths are created yet.
Force connect : node will try to connect to other nodes whether it is connected now or not (except Lock path auto creation option is enabled).
Resize : resize collider of node.

OneWay Node Info

Oneway node description example:

_images/OnewayExample.png
Node example key features:
  • Node 1:
    • Is one way [enabled]

    • Source path is in the : [Lanes]

    • External Lanes [Always empty]

  • Node 2:
    • Is one way [enabled]

    • Is end one way [enabled]

    • Source path is in the : [External Lanes]

    • Lanes [Always empty]

Direction Connection Info

Rightside Lanes

Rightside lanes (default lanes) connect TrafficNodes within a RoadSegment.

_images/ConnectionInfoExampleRightSide.png

Rightside lanes example.

Leftside Lanes

Leftside lanes (external lanes) connect TrafficNodes in external RoadSegments (external connection example).

_images/ConnectionInfoExampleLeftSide.png

Leftside lanes example.

Warning

Intersecting External paths should be replaced by a separate segment to bake the intersection of the paths.

Node Rotation

Direction of each TrafficNode must be opposite to the center of the segment

_images/TrafficNodeDirectionExample.png
Example description:
  • The arrow represents the forward rotation of the node.

  • Purple arrows the direction of the outer nodes of the segment.

  • Blue arrows the direction of the internal segment oneway nodes.

Auto-path Connection

How To Use

Note

  • To prevent auto-path connection for the selected TrafficNode enable Lock path auto creation in the settings of the node.

  • Each TrafficNode has a box collider whose is size calculated based on the number of lanes, their width, and the type of lanes (one-way or not).

  • Make sure that the direction of the node is set correctly.

_images/AutopathConnectionExample2.png

Auto path connection example.

CullState Info

States

  • Culled : entity not available for spawning.

  • CloseToCamera : entity available for spawn.

  • InVisionOfCamera : entity available for spawn only during the initial scene start.