Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Unity AI Programming Essentials

You're reading from  Unity AI Programming Essentials

Product type Book
Published in Dec 2014
Publisher
ISBN-13 9781783553556
Pages 162 pages
Edition 1st Edition
Languages
Author (1):
Curtis Bennett Curtis Bennett
Profile icon Curtis Bennett

Additional features


We've just completed creating a driving demo with a car avoiding obstacles, but there are a few more things you can do with driving AI. We can add brake and drift zones to help configure the general behavior of the car as it drives around the scene, and we can integrate Smart Car with other AI systems such as RAIN.

Adding brake zones and drift zones

Another interesting thing you can do with Smart Car is define zones in the level to either cause the car to brake and slow down or adjust the friction of the car to make it drift. These are similar to the vector fields we saw in Chapter 5, Crowd Control, where we place them in the level to affect the AI, and they aren't visible to the player but are good to use for scripting level experiences. To create a brake or drift zone in your game, add a cube to the game (go to GameObject | Create Other | Cube) and scale and translate the area you want to tag in the level. In the Inspector window for the cube, set its tag to BrakeZone...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}