Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Artificial Intelligence in Unreal Engine 5

You're reading from   Artificial Intelligence in Unreal Engine 5 Unleash the power of AI for next-gen game development with UE5 by using Blueprints and C++

Arrow left icon
Product type Paperback
Published in Oct 2024
Publisher Packt
ISBN-13 9781836205852
Length 358 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Marco Secchi Marco Secchi
Author Profile Icon Marco Secchi
Marco Secchi
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Part 1: Introducing Artificial Intelligence in Games
2. Chapter 1: Getting Started with AI Game Development FREE CHAPTER 3. Chapter 2: Introducing the Unreal Engine AI System 4. Part 2: Understanding the Navigation System
5. Chapter 3: Presenting the Unreal Engine Navigation System 6. Chapter 4: Setting Up a Navigation Mesh 7. Chapter 5: Improving Agent Navigation 8. Chapter 6: Optimizing the Navigation System 9. Part 3: Working with Decision Making
10. Chapter 7: Introducing Behavior Trees 11. Chapter 8: Setting Up a Behavior Tree 12. Chapter 9: Extending Behavior Trees 13. Chapter 10: Improving Agents with the Perception System 14. Chapter 11: Understanding the Environment Query System 15. Part 4: Exploring Advanced Topics
16. Chapter 12: Using Hierarchical State Machines with State Trees 17. Chapter 13: Implementing Data-Oriented Calculations with Mass 18. Chapter 14: Implementing Interactable Elements with Smart Objects 19. Index 20. Other Books You May Enjoy Appendix – Understanding C++ in Unreal Engine

Setting up an environment query

In this section, you’ll be learning how to add a query to a behavior tree; in particular, we will be tweaking the dummy gunner AI brain in order to let it shoot at a target achieved by an environment query.

Note

As previously mentioned, the EQS is still an experimental feature, so you should use caution if you want to develop a game using it. At the time of writing this book, the EQS is enabled by default by using the Environment Query Editor plugin.

Creating the gym

As a first step, we are going to create a proper gym, so start by doing the following:

  1. Create a level of your choice, starting from the Level Instances and Packed Level Actors, which I provided in the project template.
  2. Add a BP_GunnerDummyCharacter instance; just remember to check Use Controller Rotation Yaw so it will be able to rotate and point to the target when prompted to do this.
  3. Add one or more BP_Target instances so that your AI character will have...
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
Banner background image