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. What this means is that if you want to create a spider AI that can't be moved by the default movement component, then by creating a custom movement component, you can tell the spider AI to move anywhere you wish and still be able to integrate it into the Behavior Tree.

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

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