Book Image

Unity AI Programming Essentials

By : Curtis Bennett
Book Image

Unity AI Programming Essentials

By: Curtis Bennett

Overview of this book

Table of Contents (19 chapters)

An overview of driving


When designing AI for our characters, one of the basic concepts is to have AI move with the same rules as the player. If you ever played any old racing games, sometimes the opponent cars wouldn't follow the same physics as the player, zooming along unrealistically and therefore creating a bad player experience. So, it's important to take car physics into account, including the shape of the car and four wheels, and have the AI move in the same way as the player. This is the main reason for using an AI system especially designed for autos and driving, instead of a general-purpose game AI system we have been using such as RAIN.

The driving system we'll use is Smart Car AI by BoneBreaker, which at the time of writing this book is available in Unity Asset Store for $10. It takes into account physics for the car and uses ray casting to sense the car's environment. It actually uses two systems for navigation, which are Unity's built-in navigation system to determine paths...