Creating the player avatar’s animation blueprint
Once the character is set, the subsequent objective is to control the character animations. To accomplish this, we first create a C++ animation instance class, PlayerAvataAnimInstance
, and then use it as the base class to create the animation blueprint, ABP_PlayerAvatar
.
To keep things simple, we will assign the player character only the following animation states:
- Locomotion: This state has a Blend Space 1D that blends the Idle, Walk, and Run animations. A
Speed
float variable will be used to control the blending work.
Note
Unreal Engine’s Blend Space 1D is a tool used to blend animations based on a single-axis parameter. It allows smooth transitions between animations by interpolating values along the specified axis. Animation poses, such as walk and run, are mapped along the speed axis.
- Attack: This state plays the Attack animation. A Boolean variable,
IsAttacking
, will be used to transit...