🦾Character

In this chapter we will cover details of character animation.

Skeleton

The FPS Animation Pack provides animations for both UE4 and UE5 Mannequin Skeletons, which use identical setups for sockets and Virtual Bones:

  • VB ik_hand_gun_l: defines weapon base pose relative to the left hand.

  • VB ik_hand_gun_r: defines weapon base pose relative to the right hand.

  • VB ik_hand_gun: weapon parent bone.

    • VB hand_r: right-hand IK bone.

      • VB elbow_r: right-hand pole target.

    • VB hand_l: left-hand IK bone.

      • VB elbow_l: left-hand pole target.

  • VB ik_hand_gun_pose: weapon aiming pose.

  • VB Curves: empty bone, used for blending animation curve values.

  • FP Camera: camera parent socket.

The weapon movement is baked into the ik_hand_gun bone, so the gun is not parented to the right or left hand.

Blueprints

There are 5 main animation blueprints used in the project:

  1. ABP_Viewmodel: main blueprint that includes everything else.

  2. ABP_IK_Pose: controls first-person view pose.

  3. ABP_Ads: applies procedural aiming.

  4. ABP_IK_Animation: applies procedural animations.

  5. ABP_Movement: blends movement states, like idle, walking, sprinting, and tac sprinting.

Animation blueprints.

All ABPs, except for the Viewmodel, are fully modular with all properties exposed. They do not depend on the package API:

Example of modular blueprints in ABP_Viewmodel.

Let's see what each animation blueprint does.

ABP_Viewmodel

This is the main Animation Blueprint used in the package. It has a simple structure:

  1. General Locomotion

    1. Movement animations (idle, walk, sprint, and tactical sprint).

    2. Playing first-person animations (e.g. reloads, fire, etc.).

  2. Procedural Pass

    1. Initial IK Posing

    2. Aiming

    3. IK Additive Animations

First, the blueprint sets up the character's idle pose, main montage slot and default weapon bone pose relative to the right hand:

First Person Pose.

Next, the blueprint blends our FirstPersonPose with the ABP_Movement - it provides custom animation curves, which are later used in the Procedural Pass to animate character arms.

Applying ABP_Movement.

ABP_Movement is applied additively on top of the FirstPersonPose, and then we override VB_Curves bone in the Layered Blend Per Bone.

Finally, we blend our final result with the Additive layer:

Blending with the Additive layer.

The Additive Layer is used for the Tactical Sprinting feature in the pack. This layer applies additive animation to the right arm only, where the tactical sprinting motion overrides the left arm.

Now let's cover other blueprints used in the system. We will provide a short overview, as these blueprints already contain self-explanatory comments in the engine.

ABP_IK_Pose

This blueprint is responsible for the first-person character pose. Here is a breakdown of what it does:

  1. Rotate right index finger when sprinting (trigger discipline).

  2. Rotate the right index finger when firing.

  3. Copy animation data from real bones to the IK ones.

  4. Position arms and weapons.

This layer should be applied first, as it sets up the pose and IK bones.

ABP_IK_Ads

As the name states, this layer is responsible for aiming down sights. The FPS Animation Pack uses a unique aiming system, that has 2 modes:

  1. Absolute - sights are perfectly aligned.

  2. Additive - preserves original animation (e.g. reload).

The blend between the 2 modes is handled by the Ads Blend property, found in theWeapon Settings. The order of execution is the following:

  1. Apply additive aiming.

  2. Apply absolute aiming, where alpha = 1.f - Ads Blend.

  3. Apply Aim Point offset.

  4. Blend between idle and aiming poses.

ABP_IK_Animation

This is the last blueprint. It applies various additive animations and even hides the character mesh by scaling the head bone to almost zero:

  1. Apply Recoil Animation node - it automatically extracts recoil animation and applies it to a specified bone.

  2. Apply IK Motion - a "jiggle" animation when aiming.

  3. Apply additive locomotion using curves.

    1. IK_X/Y/Z for translation.

    2. IK_Pitch/Yaw/Roll for rotation.

  4. Adjust the elbow's virtual bones.

  5. Rotate spine bones to look up and down.

  6. Apply IK, where the targets are VB hand_r and VB hand_l.

  7. Hide the head mesh.

  8. Copy weapon bone data to the VB ik_hand_gun_pose, so the blueprint can compute additive aiming next frame.

ABP_Movement

This blueprint is responsible for procedural general animations, like idle, walk, sprint, tactical sprint, and jumping states.

Movement animation blueprint.

The FPS Animation Pack implements weapon-swapping animations by player procedural animation montages. These animations blend with the base movement and jumping, ensuring smooth results.

IK Motions

This is a special feature, used to animate the weapon when aiming:

Example IK Motion.

These motions are played via theViewmodel Controller.

Last updated