person-rifleThird Person Base Character AnimBP (ABP_TFA_TP_BaseCharacter)

Core AnimBP for third-person stance blending, aim transitions, hand IK, and left-hand grip blending.

Asset path: /Game/InfimaGames/TacticalFPSAnimations/Common/Core/Characters/ABP_TFA_TP_BaseCharacter

ABP_TFA_TP_BaseCharacter is the third-person runtime bridge between Base Character (BP_TFA_BaseCharacter) and the pack’s third-person pose stack. It pulls stance and weapon state from the owning character, blends between hip-fire and aiming stances, routes montages through stance-aware slots, and pins both hands to the weapon with FABRIK while also handling left-hand grip blending.


Quick Navigation



Dependencies


This AnimBP expects three things:

If any are missing, the AnimBP still evaluates, but you lose the related feature set, especially aim-state updates and stable hand placement.


Variables Exposed by This AnimBP


References

  • CharacterBP (BP_TFA_BaseCharacter)

    • Cached owner reference set during initialization

State Pulled from CharacterBP

  • bIsAiming

  • CurrentGrip (E_TFA_GripAttachment)

Procedural Animation Data Pulled from CharacterBP

  • RecoilTransform

Grip State Driven by Notify States

  • bIsLeftHandOnWeapon

  • CurrentGripAlpha

  • GripBlendSpeed

  • GripPoseBlendSpeed


Initialization


On BlueprintInitializeAnimation, this AnimBP calls TryGetPawnOwner, casts to BP_TFA_BaseCharacter, and stores the result in CharacterBP. If that cast fails, the graph cannot pull aiming state, grip state, or recoil data from the character.

Typical symptoms are simple: bIsAiming never changes, the aim pose never blends in, and grip alpha never updates.


Per-Frame Update Flow


On BlueprintUpdateAnimation, the AnimBP copies key runtime state from CharacterBP into local variables:

  • CharacterBP.bIsAimingbIsAiming

  • CharacterBP.CurrentGripCurrentGrip

  • CharacterBP.CurrentRecoilRecoilTransform

It also interpolates CurrentGripAlpha every frame toward 1.0 or 0.0 based on bIsLeftHandOnWeapon, using GripBlendSpeed with FInterpTo and GetWorldDeltaSeconds.


Unlock Actions Notify Hook


This AnimBP implements AnimNotify_AN_UnlockActions, and when that notify fires it clears the character busy flag by setting CharacterBP.bIsBusy = false.

That notify is emitted by Unlock Actions (AN_TFA_UnlockActions).


Left Hand Grip Flow


The pack’s Left Hand Grip (ANS_TFA_LeftHandGrip) notify state calls BPI_TFA_AnimationState.UpdateLeftHandGrip(bool IsLeftHandOnWeapon, float BlendSpeed). This AnimBP stores the incoming values in bIsLeftHandOnWeapon and GripBlendSpeed, then smooths the result over time through CurrentGripAlpha.

The notify state changes the target and the blend speed. The AnimBP performs the interpolation.


AnimGraph Overview


Stance Blend

The graph blends aimed and hip-fire stances using bIsAiming. The main tuning points are the stance blend times and the crossfades in the aim transition state machine.

The main stance blend is a BlendListByBool with:

  • Aim-in blend time: 0.2

  • Aim-out blend time: 0.2

Aiming Transitions

The graph layers a mesh-space additive aim-transition state machine on top of the stance pose. The state machine is SM_AimingTransitions, and it uses:

  • Default, which is effectively the reference pose

  • Aim Start, bound to CharacterBP.WeaponConfig.TP_Transition_AimStart

  • Aim End, bound to CharacterBP.WeaponConfig.TP_Transition_AimEnd

This layer does not replace the stance pose. It adds smoother raise and lower motion on top of it.

Transition behavior:

  • DefaultAim Start

    • Condition: bIsAiming == true

    • Crossfade: 0.05

    • Blend mode: Sinusoidal

  • Aim StartAim End

    • Condition: bIsAiming == false

    • Crossfade: 0.15

    • Blend mode: QuadraticInOut

  • Aim EndAim Start

    • Condition: bIsAiming == true

    • Crossfade: 0.05

    • Blend mode: Sinusoidal

circle-info

If WeaponConfig does not provide valid third-person aim transition assets, this state machine has nothing meaningful to play.

Breathing and Idle Additive

A looping idle sequence bound to CharacterBP.WeaponConfig.TP_IdleLoop is applied additively to give the third-person pose some subtle motion even when no montage is playing.

Montage Slots

The AnimGraph uses two slot nodes, one for montages while aiming and one for montages while hip-firing. That keeps an aiming upper-body action from blending against the wrong base stance. The aiming stance slot is named Aiming.

Hand IK with FABRIK

At the end of evaluation, the graph converts to component space and runs FABRIK for both arms:

  • Right arm: clavicle_rhand_r with effector ik_hand_r

  • Left arm: clavicle_lhand_l with effector ik_hand_l

That pins the hands to the weapon targets and helps prevent floaty arms when additives and montages are active.

Both FABRIK nodes use:

  • Effector transform space: Bone Space

  • Precision: 0.01

  • Effector rotation source: CopyFromTarget

circle-info

Both FABRIK nodes expose LODThreshold, which is handy if you want to disable IK on distant LODs.


Integration Checklist


If third-person aiming or grip blending looks inactive, check these first:

  • The mesh uses ABP_TFA_TP_BaseCharacter as its Anim Class

  • The owning pawn is BP_TFA_BaseCharacter or a child

  • The AnimBP implements BPI_TFA_AnimationState

  • Your montages include ANS_TFA_LeftHandGrip windows where expected

  • WeaponConfig provides the third-person assets referenced by the graph:

    • TP_IdlePose

    • TP_IdleLoop

    • TP_AimPose

    • TP_Transition_AimStart

    • TP_Transition_AimEnd


Troubleshooting


CharacterBP Is None

  • Confirm the mesh using this AnimBP belongs to BP_TFA_BaseCharacter

  • Confirm the mesh actually uses ABP_TFA_TP_BaseCharacter as its Anim Class

Grip Blending Does Nothing

  • Confirm the AnimBP implements BPI_TFA_AnimationState

  • Confirm your montages include ANS_TFA_LeftHandGrip

  • Confirm GripBlendSpeed is not 0

Hands Look Floaty or Detached

  • Confirm the skeleton has ik_hand_r and ik_hand_l

  • Confirm weapon IK targets are authored consistently with those bones



Last updated

Was this helpful?