Chapter 6. How Does Our AI Sense?

In this chapter, you will learn how to use the different components available within Unreal Engine 4 to enable our AI to sense the other AI and pawns that we place within the world. We will do this by taking advantage of a system within Unreal Engine called AI Perception components. These components can be customized and even scripted to introduce new behavior by extending the current sensing interface.

The topics we will cover in this chapter are as follows:

  • AI components
  • Registering a perceivable actor using AIPerceptionStimuliSource
  • Perceiving objects using AI Perception
  • The state machine

Overview

AI Perception is a system within Unreal Engine 4 that allows sources to register their senses to create stimuli, and then the other listeners are periodically updated as the sense stimuli is created within the system. This works wonders for creating a reusable system that can react to an array of customizable sensors. So, this chapter will focus on using the AI Perception component to have our enemy AI chase us whenever we are detected. What we will do differently is that this will all be scripted using Blueprint. So, there is no need to use Behavior Tree this time around!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.154.151