The Traffic Crossing Locator defines the specific properties of a crossing, used by a Traffic Locator. With the current implementation, the crossing acts as a booking central : an incoming car requests the right to traverse the crossing. If another car already registered in the crossing have a colliding trajectory, the car request is rejected, else the access is granted and this car trajectory is registered in the crossing.
For more information about Traffic, see Traffic tutorial
A Traffic Locator display, with lanes on curves, and crossings
Traffic Crossing Locators are automatically computed from the Traffic Locator. They may also be added manually in some very specific cases.
Crossing Radius | This is the radius inside which a car will start behaving as a crossing. The traffic lights will be positioned on each plugged curve at this radius length. |
Refresh Crossing | If some curves have moved inside or outside the crossing, it might be require to refresh the display correctly. |
Crossing Type | A crossing can be one of : Traffic Lights, Junction or Stop |
U Turn forbidden | In some specific cases, U turns must be avoided (foreground, etc), this attribute insures that there won't be any U turn on this crossing. |
Each Road as its specific control for lights. A light status of 0 or less means that the light is red. 1 or more means the light is green, everything between 0 and 1 is orange (acts as red in simulation). The user can decide to take control over it (keyframes, etc), or to let automatic timings to the job.
Automatic lights | Let the lights control to automatic timings (true) or user custom management (false) |
When using automatic mode, the lights will iterate over connected roads. The roads are paired (the best aligned roads are put together, then the two next best aligned roads, etc, until there is only one or two roads remaining). Then the crossing iterate from one pair to the next with the following sequence :
Timing Scale | Add a scale ratio to timings, to offset lights and avoid too much synchronization |
Green Light Time | Lights for a pair stays green for the given amount of seconds |
Orange Light Time | Lights for a pair stays orange for the given amount of seconds |
Red Light Time | All roads stay red for this time before another pair goes green. |
connectedRoad[x] | gives the name of a connected road and its matching light status parameter |
For stop crossings, each lane can be determined as the prioritary ones or one with a stop sign.
Each road will appear with a checkbox allowing to select if it is a stop or not
Each car will mark a pause at the stop, considered to be the time to acquire information before leaving it, which can range from [stop min time] to [stop max time] seconds.
Stop Min Time | The minimal time a vehicle will stop before leaving the stop. |
Stop Max Time | The maximal time a vehicle will stop before leaving the stop (if no vehicle is preventing from leaving the stop). |
Keep Straight Ratio | When a car drives on a crossing and have to cross the opposite lanes, it will advance from a configurable distance. At 0 ratio, the crossing bezier curve of the car starts directly from the "stop line" of the traffic lights. When the ratio is 1, it will keep straight until reaching the middle of the crossing, before starting its bezier trajectory to its exit lane. |
Invert Priority | In some seldom cases, one may want to invert priorities, for example to simulate a round about with several children crossings. This has only a very minor impact for now, and is reserved for future use. |
The Stop Line positions depends on where the curve end tip actually is. The stop line will be exactly (crossing radius) before the curve end tip, which means that for a curve meeting at the crossing center, the stop line will be at the crossing circle border. If you need to move a stop line, you can either modify the radius (for all roads) or move the specific curve end tip, taking care of keeping it inside the crossing, or it will not be considered connected. If it is difficult to keep the end tip inside the crossing, crossing circle can be made an ellipse by scaling it in X & Z directions, and can also be rotated around Y. Scaling/rotating the circle radius will NOT modify the stop line position, but only allow to position the end tip potentially further than what can be achieved by default.