Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Blueprints Visual Scripting for Unreal engine

You're reading from   Blueprints Visual Scripting for Unreal engine Build professional 3D games with Unreal Engine 4's Visual Scripting system

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher Packt
ISBN-13 9781785286018
Length 188 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Brenden Sewell Brenden Sewell
Author Profile Icon Brenden Sewell
Brenden Sewell
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Making the AI chase the player


Now that we have a patrol behavior established, we should make the enemy pose some threat to the player. To do so, we will give the enemy the ability to see the player and pursue them.

Giving the enemy sight with Pawn Sensing

To grant the enemy the ability to detect the player, we need to add a PawnSensing component to the EnemyController. To do this, open the EnemyController Blueprint and click on the Add Component button in the Components panel. Search for and add the PawnSensing component. This component gives us the ability to add a few additional event triggers to the EnemyController event graph. The one we are interested in now is called OnSeePawn (PawnSensing), as shown here:

Note

There is a second system that can be used for AI behavior development and environment sensing called the Environment Query System (EQS). As of Unreal Engine version 4.7.6, this feature is still in the experimental development phase and has some bugs that prevent it from being recommended...

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
Visually different images