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

Following a path

Before diving into A*, which is a procedural approach to pathfinding, we'll implement a more rudimentary waypoint-based system. While more advanced techniques, such as the aforementioned A* method or Unity's NavMesh, will often be the preferred method for pathfinding, looking at a simpler, more pure version will help set the foundation for understanding more complex pathfinding approaches. Not only that, but there are many scenarios in which a waypoint-based system will be more than enough, and will allow more fine-tuned control over your AI agent's behavior.

In this example, we'll create a path, which is made up of individual waypoints. For our purposes, a waypoint is simply a point in space with an X, Y, and Z value; we can simply use a Vector3 to represent this data. By making a serialized array of Vector3 in our script, we'll be able...

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}