Initialize
Description
Initializes the entire Traffic System by adding all the necessary components before starting the Traffic System.
This method should be called only once at the beginning of the scene.
Declaration
Supports multiple declarations based on the needs.
Parameters
Name | Description |
---|---|
activeCamera | Camera that follows the player or the player itself. Used to determine the line of sight for vehicle instantiations. |
nrOfVehicles | The maximum number of traffic vehicles that can be active simultaneously. This value cannot be increased later during runtime. |
vehiclePool | Available vehicles asset. More details about the Vehicle Pool, including its configuration can be found in Setup Guide: Vehicle Pool |
trafficOptions | A TrafficOptions object used to store the initialization properties. |
activeCameras | Cameras that follow the players. Utilized in multiplayer scenarios. |
Example
Initializing the Traffic System inside a scene.
Last updated