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
Unreal Engine 4 AI Programming Essentials

You're reading from   Unreal Engine 4 AI Programming Essentials Create responsive and intelligent game AI using Blueprints in Unreal Engine 4

Arrow left icon
Product type Paperback
Published in Mar 2016
Publisher
ISBN-13 9781784393120
Length 188 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
 Newton Newton
Author Profile Icon Newton
Newton
 Feng Feng
Author Profile Icon Feng
Feng
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Unreal Engine 4 AI Programming Essentials
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
1. Introduction to Game AI FREE CHAPTER 2. Creating Basic AI 3. Adding Randomness and Probability 4. Introducing Movement 5. Giving AI Choices 6. How Does Our AI Sense? 7. More Advanced Movement 8. Creating Patrol, Chase, and Attack AI 9. What Have We Learned? Index

Traces


We will use this to trace from the player's location to 255 units in front of the character. If anything collides with the trace, we will face the pawn to the right based on the pawn's rotation. This simple check will be enough to make our bot run along the walls indefinitely; so, perform the following steps:

  1. Pull the Return Value pin from GetActorLocation and drop it. Then, search for Vector + Vector.

  2. We now need to select Get Controlled Pawn and pull Get Actor Forward Vector from it. This contains vector information going in the direction that is in front of our pawn.

  3. So we will multiply Return Value by 255. This is the vector we want to add to the actor's location. This results in adding 255 units in the direction ahead of the pawn's current location.

  4. Now, we need to take the results of the addition of the End pin for the LineTraceByChannel node. This will trace directly in front of our pawn:

  5. Pull from the Vector + Vector node again, and this time we will plug it into the Dest pin for...

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 £13.99/month. Cancel anytime
Visually different images