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 2017 Game AI Programming - Third Edition - Third Edition

You're reading from  Unity 2017 Game AI Programming - Third Edition - Third Edition

Product type Book
Published in Jan 2018
Publisher Packt
ISBN-13 9781788477901
Pages 254 pages
Edition 3rd Edition
Languages

Table of Contents (10) Chapters

Preface 1. The Basics of AI in Games 2. Finite State Machines and You 3. Implementing Sensors 4. Finding Your Way 5. Flocks and Crowds 6. Behavior Trees 7. Using Fuzzy Logic to Make Your AI Seem Alive 8. How It All Comes Together 9. Other Books You May Enjoy

Setting up the scene

In order to get started with implementing the sensing system, you can jump right into the example provided for this chapter, or set up the scene yourself, by following these steps:

  1. Let's create a few barriers to block the line of sight from our AI character to the tank. These will be short but wide cubes grouped under an empty game object called Obstacles.
  2. Add a plane to be used as a floor.
  3. Then, we add a directional light so that we can see what is going on in our scene.

As you can see in the example, there is a target 3D model, which we use for our player, and we represent our AI agent using a simple cube. We will also have a Target object to show us where the tank will move to in our scene.

For simplicity, our example provides a point light as a child of the Target so that we can easily see our target destination in the game view. Our scene hierarchy...

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}