7

Controlling Characters

In Chapter 6, we created our player character, the PlayerAvatar class, and the BP_PlayerAvatar blueprint. The next thing we want to do is to control the player character. Since the engine automatically generated the default PangaeaPlayerController class when the project was created, moving the player character is already functional. However, that is not enough because we want more control over the player character.

In this chapter, you will learn how to add a new input action to the action map, handle an input event to trigger an attack, as well as how to add a notify to the timelines of attack, hit, and die animations.

This chapter will also introduce the concept of garbage collection, which is the engine’s important ...

Get Unreal Engine 5 Game Development with C++ Scripting 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.