A versatile and user-friendly asset designed for game developers who want to create realistic and dynamic urban environments.
Intuitive Node Placement: Easily place customizable nodes to represent road junctions, giving you total control over your urban layout.
Seamless Roadway Connections: Connect different junctions effortlessly to design intricate road networks that bring your game world to life.
Automatic Sidewalk Generation: Sidewalks automatically appear alongside your roadways, enhancing the urban feel with minimal effort.
Complete Customization: Tailor every aspect of your roads, from lane widths and sidewalk sizes to the materials used, ensuring each road fits perfectly in your game’s aesthetic.
One-Click Road Generation: Create complex road systems with a single click, saving time and streamlining the development process.
Automated Traffic Nodes: Traffic nodes are laid out automatically, ensuring smooth and realistic traffic flow in your game.
Free Roaming Vehicle AI: Our asset includes a wheel collider-based vehicle AI that roams freely, adding a dynamic layer to your game world.
Dynamic AI Spawning: Vehicle AIs spawn within a certain range of the player, keeping the game environment lively and interactive.
Functional Traffic Signals: All road junctions feature working traffic lights, adding to the realism and complexity of your urban environments.
Customizable Vehicle AI Pool: Choose and customize the types of vehicles that populate your roads, tailoring them to match the theme of your game.
Advanced Path Finding: Our sophisticated pathfinding script calculates the least number of road junctions to travel from start to end point, ensuring efficient navigation for in-game characters and vehicles.
Bring Your Game to the Next Level
With the "Urban Roads and Traffic System," you’re not just building roads; you’re crafting lifelike urban landscapes where every detail counts. Perfect for city simulations, racing games, or any project that requires a touch of urban realism.
Transform your game world today with the Simple Road and Traffic System - your key to dynamic, realistic, and engaging urban environments!
Add “RoadTrafficManager”:
From prefabs folder locate and add RoadTrafficManager prefab to your scene. There should only be one instance of this prefab in one scene.
Go to: Window > GameDevStuff > Urban Roads and Traffic to access the Urban Roads and Traffic window. Assign the RoadTrafficManager instance to the roadTrafficManager variable.
You can now start making road networks.
Setup Layers:
Go to: Edit > Project Settings > Tags and Layers
Add two layers named “Vehicles” and “Traffic Nodes”.
Make sure the scene has a flat ground plane.
Adding Road Nodes
With the RoadTrafficManager selected, hold Alt and click anywhere in the scene where you want to insert a road node. Use Alt + Click to add further nodes into the scene. Each road node represents a road junction.
Adding Road Connections
To add a connection between two nodes, select first node and press “C” then select the next one and press “C” again. The connection will be added. To cancel connection operation in between press “C” again with the same node selected.
Add the appropriate connections and make sure all nodes are covered in closed loops.
Generate Road Networks
After adding road nodes and road connections, press the “Update Roads” button in the “Urban Roads and Traffic” Window. The road and sidewalk mesh will be generated in the scene.
The asset comes with a “Test Vehicle” Prefab. You can modify the prefab by disabling the default Chassis and adding custom vehicle model and colliders. Reposition the vehicle colliders according to your new vehicle model. Create Prefab variants for different vehicle models from the Test Vehicle Prefab.
Traffic Setup
Locate the “TrafficManager” Component in the RoadTrafficManager Object. Assign the player transform to the “player” variable. This enables the traffic manager to spawn vehicle AIs near the player. You can customize the spawn start and end radius.
Assign the “Traffic Nodes” and “Vehicles” layers to the Traffic Node layer and Vehicle layer masks.
Vehicle Pool
Create vehicle pool by assigning your vehicle prefabs to the vehicle pool list in the traffic manager component. The traffic manager randomly spawn vehicles from this pool.