Traffic Lights Crossing

A traffic light crossing is a pedestrian crossing with traffic lights, something like this:

To set it up go to Settings Window -> Intersection Setup

If Show All Intersections is checked you will see the intersections from the entire scene. If unchecked, only the intersections visible in the scene view will be displayed. Using the View, Edit, and Delete buttons you can perform the respective operations on each intersection from that list.

Press Create Traffic Lights Crossing to create a new light crossing. This will open the Traffic Lights Crossing Setup Window.

Hide Waypoints - will hide the scene waypoints offering you the possibility to select different objects inside the scene.

The Green and Yellow times will be applied if the corresponding times in the Traffic Component are set to -1. See the Initializing Assetsection for more details.

The Red Light Time is the time allowed for pedestrians to cross the road.

Press Assign Road to select the stop waypoints.

Select the waypoints where you want cars to stop at red lights. Selected waypoints will be marked with red circles.

Select your red, yellow, and green light objects. They will be enabled when that light color is on and disabled when the light color is off.

You can add more waypoints to any road by using the Assign Road button.

You can delete a waypoint by using the Delete button.

Using the View buttons, you can focus the scene view on the selected waypoint.

If an intersection does not change the light colors it might be outside of the active cells. See the Prepare Scenesection for more info.

If you want to check the status (the color of the traffic light) you can use the APIGetTrafficLightsCrossingState. If the color is Red make your pedestrians cross.

Last updated