I am making a racing game and I need to make an AI for my opponent racers, but I have no idea how to.
The idea is that there will be opponent cars that:
- Use the vehicle wrapper
- Drive on the road and turn automatically to stay on the road
- Can dynamically dodge obstacles and other cars that try to move in front of or into it from the side
I have already implemented the vehicle wrapper to the car. For the AI, I have tried to use radar and ray sensors to detect invisible walls and steer based off that, but it apparently doesn't work with sharp corners very well, of which my game has a lot. I also tried a steering actuator using the seek and pathfinding options and a navmesh, but they won't let the car steer around obstacles.
Any help is appreciated. Thank you.