Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity AI Programming Essentials

You're reading from   Unity AI Programming Essentials Use Unity3D, a popular game development ecosystem, to add realistic AI to your games quickly and effortlessly

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781783553556
Length 162 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Curtis Bennett Curtis Bennett
Author Profile Icon Curtis Bennett
Curtis Bennett
Arrow right icon
View More author details
Toc

Quick Path AI

Quick Path is back again, with built-in capabilities to handle patrol. With its simple approach to AI, only a few straightforward steps are needed to get a scene finished. Here is a breakdown of these steps:

  • Making the world ready for patrol
  • Setting up the patrol script

We'll start by expanding on our world from Chapter 1, Pathfinding the quick path demo. Stretch out a couple of the blocks to make a larger surface area. Then, click on the terrain object (the parent of all the cubes forming the terrain), and in the Inspector, click on the Bake button. You can see what happens next in the following screenshot:

Quick Path AI

If the Bake function isn't covering all the areas, you'll need to check its grid dimensions. X remains the same in the world space, but Y is actually the Z axis. You might need to increase or decrease these numbers to cover everything in the scene:

Quick Path AI

Quick Path converts the values of the Y or Z axis values internally. By default, it is set to Y as the Up/Down...

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 €18.99/month. Cancel anytime