I’m building vehicle AI based on the chaos wheeled vehicle pawn. It uses 24 line traces in a radial pattern around itself to try to avoid obstacles in its way as its traveling, with a sphere trace in the center to avoid trees. This is what that looks like.
It navigates using a waypoint system plotted on a spline. As it comes within a certain distance threshold of each waypoint, it places down the next one until it reaches the end point and then a new spline is generated.
It works alright, but I keep running into scenarios where it gets stuck either on an environment obstacle or on another vehicle AI. More of the latter than the former.
Here’s a video demonstrating a bit of what I’m talking about. As the video goes on you see eventually all of the vehicle AI eventually get stuck on each other. They start getting stuck pretty badly around the 3:00 mark.
Video
The collision avoidance works by checking each line trace for a hit under a certain distance threshold and then checks each unobstructed line trace for one with an end point nearest to the current navigation waypoint and begins rotating towards that location. Those are the white debug spheres you see in the video. I’m kind of drawing a blank for how to proceed so I’m asking for advice on how to change things up here to get it working better
Any advice on how to rethink my avoidance logic would be greatly appreciated here. Thanks for your time.