Skip to main content

B1AnimNotifyState_BodyFit

File: BlueClient2/Source/BlueClient/Animation/AnimNotifies/B1AnimNotifyState_BodyFit.h / .cpp Base Class: UAnimNotifyState

Purpose

Activates a bone IK constraint that makes a specific bone chain conform to a target socket position (e.g., hand gripping a handle, foot planting on a surface). Active for the duration of the notify range with smooth blend-in and blend-out.

How to Add in the Editor

  1. Open an Animation Montage or Animation Sequence.
  2. Right-click on the Notify trackAdd Notify StateB1AnimNotifyState_BodyFit.
  3. Drag the right edge to set the duration. Configure properties in the Details panel.

Editor Properties

PropertyTypeDefaultDescription
ChainBoneEB1ChainBoneTypeInvalidBone chain to apply IK to (e.g., right hand, left hand, right foot)
TargetSocketFNameSocket name on the scene that the bone chain should aim toward
BlendInfloat0.25Blend-in duration (normalized 0–1, clamped)
BlendOutfloat0.25Blend-out duration (normalized 0–1, clamped)
Weightfloat1.0Maximum IK weight at full blend (min: 0)

Console Variable

b1.Anim.BodyFit 0 — disables BodyFit globally (useful for debugging IK issues).

Behavior

CallbackAction
NotifyBeginGets UB1BonePostProcessAnimInstance, creates FB1BodyFitData from socket transform + chain config, calls animInstance->StartBodyFitIK(ChainBone, data)
NotifyEndCalls animInstance->StopBodyFitIK(ChainBone, GetUniqueID()) to release the IK constraint