Game Developer jourverse continues exploring building a traffic system in Unreal Engine 5.
Game Developer jourverse, who is currently working on a tutorial series focused on building a traffic system in Unreal Engine 5, shared a demo project file for this procedural road network integrated with vehicle AI for obstacle avoidance, using A* for pathfinding.
The developer explained that both the A* algorithm and the road editor mode are implemented in C++, with no use of neural networks. Vehicle AI operations like spline following, reversing, and performing 3-point turns are handled through Blueprints. The vehicle AI navigates using two paths: the green spline for the main route and the blue spline for obstacle avoidance. The main spline leverages road network nodes to determine the path to the target via A* on FPathNode, which includes adjacent road nodes.
For obstacle detection, the vehicle employs polynomial regression to predict its future position. Upon detecting an obstacle, a grid of sphere traces is generated to map the obstacle's location, and another A* algorithm is employed to create a path around the obstacle.
Get the project by clicking this link and check out the latest video of the Unreal Engine AI Vehicle Tutorial series:
Find all the released chapters in the dedicated playlist and subscribe to jourverse's YouTube channel for more Unreal Engine 5 tutorials. Don't forget to join our 80 Level Talent platform and our Telegram channel, follow us on Instagram, Twitter, LinkedIn, TikTok, and Reddit, where we share breakdowns, the latest news, awesome artworks, and more.