Traffic Area

Traffic Area is used for restricted traffic areas with an order of entry and exit.

Use-case examples:

Youtube tutorial.

How To Create

  1. Create an empty GameObject and add TrafficAreaAuthoring component

  2. Set the Button select type to Select node value.

  3. Enable the Show scene nodes option to see the traffic nodes in the scene.

  4. Set New node type to Default value.

  5. Select Default nodes in the scene.

    _images/TrafficAreaExample2.png

    Selected Default nodes example.

  6. In the same way, select the Queue node in the scene.

    _images/TrafficAreaExample5.png

    Selected Queue node example.

  7. Select Enter node in the scene.

    _images/TrafficAreaExample4.png

    Selected Enter node example.

  8. Select Exit node in the scene.

    _images/TrafficAreaExample6.png

    Selected Exit node example.

  9. Adjust the Max queue count depending on how many cars can fit in the queue without blocking other cars.

    _images/TrafficAreaExample7.png

    TrafficArea result example (parking created by ParkingBuilder ).

Settings

_images/TrafficArea.png

Settings

Max queue count : maximum number of cars in a queue (if the maximum number is exceeded the entrance node will be closed).
Max skip enter order count : number of vehicles that can be let in at the entrance (1 value example: 1 enters vehicle - 1 exits - 1 enters - 1 exits).
Has exit order : cars leave the TrafficArea on a queue basis.

Scene visual

Draw connection : on/off visual connections.
Draw connection lines : on/off connection lines to the traffic nodes.
Button select type:
  • Disabled

  • Remove node : selected node will be removed from TrafficArea.

  • Select node : selected node will be added to TrafficArea with the select New node type.

Show traffic area node type : nodes with the selected node type will be displayed in the scene.
Show scene nodes : on/off display add buttons paths to TrafficArea.
New node type : TrafficNode with the selected node type will be added to the TrafficArea.

Node type

  • Default : a node which is included in the TrafficArea but does not belong to one of the types listed below.

  • Enter : entrance node to the TrafficArea (if the maximum number of vehicles in the queue is exceeded, the node will be closed).

  • Queue : node in front of which a line of cars is waiting.

  • Exit : when it passes this node, the car leaves the TrafficArea.