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
Hands-On Artificial Intelligence with Unreal Engine

You're reading from   Hands-On Artificial Intelligence with Unreal Engine Everything you want to know about Game AI using Blueprints or C++

Arrow left icon
Product type Paperback
Published in Apr 2019
Publisher Packt
ISBN-13 9781788835657
Length 552 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Francesco Sapio Francesco Sapio
Author Profile Icon Francesco Sapio
Francesco Sapio
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: The Unreal Framework FREE CHAPTER
2. Making the First Steps in the World of AI 3. Behavior Trees and Blackboards 4. Navigation 5. Environment Querying System 6. Agent Awareness 7. Extending Behavior Trees 8. Crowds 9. Section 2: Designing and Implementing Behavior Trees
10. Designing Behavior Trees - Part I 11. Designing Behavior Trees - Part II 12. Designing Behavior Trees - Part III 13. Section 3: Debugging Methods
14. Debugging Methods for AI - Logging 15. Debugging Methods for AI - Navigation, EQS, and Profiling 16. Debugging Methods for AI - The Gameplay Debugger 17. Going Beyond 18. Other Books You May Enjoy

AI Controller

From the Expected Behavior, we have concluded that we need a Perception System to check whether the agent is able to see the Player.

Once again, we can create our AI Controller both in Blueprint or C++.

Implementing the AI Controller in Blueprint

First of all, create a new AI Controller and name it BP_ChasingAIController by selecting the AIController Class:

In the editor, we need to add two variables (so that the Service we build in the next chapter will be able to retrieve the values within them). The first variable is LastKnownPlayerPosition of type Vector, and the second is CanSeePlayer of type boolean, as shown in the following screenshot:

Now, we need to add the perception component. So, from the Components...

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 $19.99/month. Cancel anytime