Skip to main content

B1AnimNotify_FootSteps

File: BlueClient2/Source/BlueClient/Animation/AnimNotifies/B1AnimNotify_FootSteps.h / .cpp Base Class: UAnimNotify

Purpose

Plays footstep audio at the notify frame by detecting the physical material of the floor beneath the foot socket and matching it with the character's current shoe outsole type.

How to Add in the Editor

  1. Open an Animation Montage or Animation Sequence.
  2. Right-click on the Notify trackAdd NotifyB1AnimNotify_FootSteps.
  3. Set PrintSocketName to the foot socket (e.g., foot_l or foot_r) in the Details panel.

Editor Properties

PropertyTypeDefaultDescription
PrintSocketNameFNameSocket on the foot bone used as the trace origin
OptionalSoundIdFName(empty)Override sound ID; if empty, the sound is auto-selected from the material/outsole lookup table
TraceChannelECollisionChannelECC_GameTraceChannel10Collision channel for the ground line trace
TraceStartZOffsetfloat100.0Z offset above the socket where the trace begins
TraceEndZOffsetfloat-150.0Z offset below the socket where the trace ends
VolumeMultiplierfloat1.0Volume scale applied to the spawned audio
PitchMultiplierfloat1.0Pitch scale applied to the spawned audio
bFollowboolfalseIf true, the audio component moves with the character

Behavior

  1. Performs a line trace downward from the foot socket position.
  2. Reads the UPhysicalMaterial from the hit surface.
  3. Determines the shoe outsole type from UB1AppearanceComponent on the character.
  4. Looks up the matching FB1FootStepsAudioTableRow using material + outsole combination.
  5. Loads and spawns the audio via UB1AudioManager (2D or attached depending on bFollow).
  6. Sets the MoveVelocity parameter on the audio component to match character speed.