The movement component

The movement component is the driving force behind animation. Similar to the other types of movement components, such as a vehicle's movement component, we will provide inputs, which will then communicate with other components in the backend to properly simulate animation or gear ratio changes. What this means is that other functions can also influence the pawn that has the movement component. So, if our Behavior Tree tells the AIController to focus on another pawn, the AIController will influence the direction that the pawn it possesses is facing. This means wonders for not having to explicitly tell your pawn this information.

The AIController

We previously used the AIController to move our pawns in Chapter 2, Creating Basic AI, and Chapter 3, Adding Randomness and Probability, but never took the time to understand what's happening within Unreal Engine 4 to make it happen. Having this understanding allows you to expand on movement components when, for example, you want to create your special extensions of the movement component to support the receiving of instructions such as Move to Location for a vehicle.

The AIController is a controller specifically built for AI. Similar to the PlayerController, it controls the pawn it currently possesses. The main difference is that the AIController comes with functions, which allow you to move AI using tools such as Move to Location. With Move to Location, you can specify the Acceptance Radius value, whether or not to use Path Finding, and other useful options. There is also a simple version of Move to Location, which sometimes provides smoother movement at the cost of not able to change the options. This means that all the options are default, as shown in the Move to Location node.

It's called Simple Move to Location and is located as in the following screenshot:

The AIController
..................Content has been hidden....................

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