I am making a racing game and I got a question. I want to make AI of simple street drivers(not opponents, but just simple pople). I want to know, how to make that AI that follows its path... Could you give me image or video tutorial?
You can make AI drivers follow a path very easily. First, add an always sensor. Enable Positive triggering (pulse mode). connect that to an And controller. Then add a Steering actuator. (connect that to the And controller) change the Steering actuator's Behavior from Seek to Path Following. Then add a a plane, extrude it to whatever shape you want, then change the Physics type from Static to Navigation Mesh. Add an object to be used as the end destination. Your navigation mesh must connect from your AI driver's starting point to the ending point. Select your AI driver, and put the name of your Navigation Mesh in the input field entitled navigation mesh. then put your ending destination object's name in the input field for Target Object. if you did this correctly, your AI driver will follow the navigation mesh On The Shortest Route Possible to reach the end point. It is important to note two things. First, the navigation mesh is invisible and has no collision with anything else. Secondly, Because the AI driver will follow the path on the shortest route possible, the thinner the path, the better. Notice the path the object will take in the following pictures From those two pictures, you can conclude that a wide path does not work as expected.
AI Driver's logic setup