Introducing movement

We only covered movement for pawns because this book is just an introduction. However, if you had any interest in getting other pawn types to move, you have to recreate the junction box, which is the movement component. This movement component for a type of pawn is responsible for taking input delta and converting it into acceleration.

What this means for the car AI is first getting the direction from one point to another, resulting in the position direction. Then, we need to make this position direction relative to the car AI by subtracting it from the car AI's forward direction. This results in a direction delta, which can be applied to the car AI's direction.

You can do something similar in 3D space for a spaceship as well. ...

Get Unreal Engine 4 AI Programming Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.