Pedestrian Node

How To Create

There are 2 ways:
  1. Create node by yourself in the Unity toolbar:

    Spirit604/Create/PedestrianNode

    _images/PedestrianNodeToolbarExample.png
  2. Create node with PedestrianNodeCreator tool.

Pedestrian Node

Pedestrian node is a node for creating pedestrian route.

Youtube tutorial.

_images/PedestrianNode.png

Connection Data

Connected traffic node : connected traffic node (for parking).
Related traffic light handler : connected traffic light.
Auto connected pedestrian nodes : connected other nodes along selected direction raycasts.
Default connected pedestrian nodes : connected other nodes by the user.

Directions of auto-connections

Direction of raycasts to connect with other nodes (can be useful for generating squared scenes).

_images/PedestrianNodeDirectionsExample.png

All connection directions enabled example.

Note

Used by road parent.

Custom Node Settings

Default

Default node for the route.

Sit

Node for benches, seats, etc (test scene).

_images/PedestrianNodeSeatSettings.png
Show seats : enable editor display of seats.
Base offset : offset between the center of the seats and the center of the node.
Seat offset : offset between the seats.
Enter seat offset : offset between the animation start position and the seat.
Seat height : seat height.
Capacity : number of seats (adjustable in the settings of the node).

Note

Required PedestrianNodeSeatSettings component.

_images/PedestrianNodeBenchExample.png

Bench example.

House

Node for entry/exit to the house (test scene).

Tip

  • Enable Can spawn in view in the pedestrian node settings to simulate leaving from the house.

  • Pedestrians who have entered the house node are will be destroyed.

Idle

Node for temporary idling pedestrians (test scene).

Note

  • To set a custom idle time at the node, add the PedestrianNodeIdleSettings component.

  • _images/PedestrianNodeIdleAuthoring.png

Car parking

Node to enter/exit a parked car (generated by ParkingBuilder). Read more about parking states.

_images/PedestrianNodeParkingExample.png

Parking node example.

Talk area

Node for crowd conversations of pedestrians (test scene).

Area shape type: type of area shape.
  • Square

  • Circle

Area size : area size.
Min/Max spawn count : min/max number of pedestrians that the area can contain.
Unlimited talk time : on/off infinite conversation for pedestrians in the talk area.
Show bounds : show bounds of area.
_images/PedestrianNodeTalkAreaExample.png

Talk area example.

Traffic public stop station

Node for waiting for public transport.

Note

To set the maximum number of waiting vehicle passengers, adjust the capacity parameter.

_images/PedestrianNodeStopStationExample.png

Stop station example.

Traffic public entry

Node for entering public transport.

_images/PedestrianNodePublicEntryExample.png

Public entry example (white box).

Warning

Entry node should be any GameObject with the component VehicleEntryAuthoring which adds a node with Traffic public entry type.

Common Settings

Shape typeshape of the area for randomization of pedestrian targets.
  • Circle

  • Square

  • Rectangle

Can spawn in view : can spawn in view of camera or not.
Capacity : -1 value is unlimited; Capacity for objects like benchs, houses, public stop stations etc…
Priority weight : weight for choosing random node by pedestrian.
Custom achieve distance : custom achieve distance for pedestrian. If 0 then default value is taken.
Chance to spawn : chance to spawn pedestrian at node [0 = 0%, 1 = 100%].
Max path width : maximum width of the route around the node.
Height : maximum height size of the node area (square and rectangle shapes only).
Has movement random offset : are supposed to randomize the position around a node.

Buttons

Connect : node will make raycasts to the selected directions to connect other nodes.
Attach to closest traffic node : trying to connect to a nearby TrafficNode.
Open advanced connection window : open Advanced connection window.

Hotkeys

_images/PedestrianNodeCreatorHotkeyConfig.png

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 (unless the Can spawn in view option is enabled).

Pedestrian Node Creator

Pedestrian Node Creator is a tool to quickly create and connect pedestrian nodes.

Youtube tutorial.

How To Create

Select in the Unity toolbar:

Spirit604/Create/PedestrianNodeCreator

_images/PedestrianNodeCreatorToolbarExample.png

How To

Create Node

  1. Press the Tab button on the keyboard to create preview PedestrianNode.

  2. Place the preview PedestrianNode at the desired position.

  3. If you need to attach the PedestrianNode to a custom shape surface, enable Auto Attach To Surface in the Inspector.

  4. Press E button on the keyboard to create the final PedestrianNode.

    Tip

    You can change the hotkeys to your taste.

Select Node

  1. Choose Selection mode.

  2. Click W above the node to select PedestrianNode.

Connect Node

  1. Select the desired node.

  2. Click E over the target PedestrianNode to connect (Single selection mode only).

Locate Node

  1. Choose Selection mode.

  2. Select the desired nodes.

  3. Drag the position handle to the desired position.

Settings

_images/PedestrianNodeCreatorSettings.png
Show handlers : on/off position handles for nodes.
Show handle type:
  • Only created : only the created nodes will have handles shown

  • Only selected : only the selected nodes will have handles shown.

  • All : all nodes will have handles shown

Selection mode:
  • Single : only 1 node is selected.

  • Multiplemultiple nodes can be selected.
    • Multiple handle type:
      • Single : node has a position handle each individually.

      • All : all nodes have the same position handle.

    • Unselect selected : if you try to select an already selected node, it will be unselected.

Max path width : global width of routes for all nodes (enable preview here, save global width here).
Connect with previous node : currently created node will be connected to the previously created node.
Auto select connected node : node will be selected after it is connected to the source node.
Allow connect traffic node : on/off feature to connect to the TrafficNode.
Auto split connectionif a node is located between a connection of existing nodes, the connection will be reconnected between them (made with a Raycast).
  • Disabled

  • Right angle : 90° angle.

  • Custom angle : user custom angle.

Auto rejoin line : if there are other nodes on the connection line, they will automatically be connected to each other in one row.
Auto attach to surfaceauto attach created node to surface.
  • Surface mask : layer mask to attach.

  • Attach type:
    • Collider : attach to collider.

    • Mesh : attach to mesh.

Auto snap positionauto snap node position during creation.
  • Snap value : snapping value.

Scene Settings

_images/PedestrianNodeCreatorSceneSettings.png
Show path : show pedestrian node routes.
Show path type:
  • All : all the nodes will be shown.

  • Only created : only the nodes created by the creator will be shown.

Show node buttonson/off display custom buttons of selected nodes.
  • Node button type:
    • Delete : node will be deleted by clicking.

    • Unselect node will be unselected by clicking.

Show unique info : unique information of the node will be displayed (different from the original prefab).
Show reset custom route buttons : for nodes with a custom route width, the reset buttons will be displayed.
Show border routes :
  • Current : route will be displayed with the assigned width of the nodes.

  • Selected : route will be displayed with the selected route width in the creator settings.

Show traffic node connection : on/off display the connection to the TrafficNode.
Show selected node settings : shows node settings in the inspector.

Buttons

Create node : create preview node.
Add all scene pedestrian nodes : all nodes will be added to the creator.
Add all scene custom pedestrian nodes : only nodes with custom widths will be added to the creator.
Save global path width : сhange the width of the route for all nodes.
Reset all custom path width : for all nodes with custom widths will be assigned the default value.
Clear created nodes info : clear the list of nodes created by the creator.
Clear selection : clear selected nodes [multiple selection mode only].
Snap to grid : snap selected node position [for selected node only, auto snap should be enabled].
Open advanced connection window : open Advanced connection window [for selected node only].

Hotkeys

_images/PedestrianNodeCreatorHotkeyConfig.png

Advanced Connection Window

Help window for advanced node connection settings.

Split Connection

Split the existing connection into several nodes.

_images/SplitConnection.png
Target pedestrian node : selected node where the split connections will be.
Split count : number of new nodes created between the selected two.
_images/SplitConnectionExample1.png _images/SplitConnectionExample2.png

Split connection example.

Note

Split is available for already connected nodes only.

Join To Connection

Connect the selected node to an existing connection.

_images/JoinToConnection.png
Target pedestrian node 1 : target node 1 of selected connection.
Target pedestrian node 2 : target node 2 of selected connection.
Attach to line : source node will be moved to the line connecting target nodes.
_images/JoinToConnectionExample1.png _images/JoinToConnectionExample2.png

Join to connection example 1.

_images/JoinToConnectionExample3.png _images/JoinToConnectionExample4.png

Join to connection example 2 (attach to line enabled).

Create Custom Route Width

Create a custom route with custom width between two nodes.

_images/CreateCustomRouteWidth.png
Target pedestrian node 1 : target connected node of selected connection.
Custom route width : new width of custom route.
Offset from nodes : new created nodes offset from existing nodes.
_images/CreateCustomRouteWidthExample1.png _images/CreateCustomRouteWidthExample2.png

Create custom route width example.

Change Current Route Width

Set the custom width to the two selected nodes.

_images/ChangeCurrentRouteWidth.png
Target pedestrian node 1 : target connected node of selected connection.
Custom route width : new width of custom route.
_images/ChangeCurrentRouteWidthExample1.png _images/ChangeCurrentRouteWidthExample2.png

Change current route width example.