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¶
- Open an Animation Montage or Animation Sequence.
- Right-click on the Notify track → Add Notify →
B1AnimNotify_FootSteps. - Set
PrintSocketNameto the foot socket (e.g.,foot_lorfoot_r) in the Details panel.
Editor Properties¶
| Property | Type | Default | Description |
|---|---|---|---|
PrintSocketName |
FName |
— | Socket on the foot bone used as the trace origin |
OptionalSoundId |
FName |
(empty) | Override sound ID; if empty, the sound is auto-selected from the material/outsole lookup table |
TraceChannel |
ECollisionChannel |
ECC_GameTraceChannel10 |
Collision channel for the ground line trace |
TraceStartZOffset |
float |
100.0 | Z offset above the socket where the trace begins |
TraceEndZOffset |
float |
-150.0 | Z offset below the socket where the trace ends |
VolumeMultiplier |
float |
1.0 | Volume scale applied to the spawned audio |
PitchMultiplier |
float |
1.0 | Pitch scale applied to the spawned audio |
bFollow |
bool |
false | If true, the audio component moves with the character |
Behavior¶
- Performs a line trace downward from the foot socket position.
- Reads the
UPhysicalMaterialfrom the hit surface. - Determines the shoe outsole type from
UB1AppearanceComponenton the character. - Looks up the matching
FB1FootStepsAudioTableRowusing material + outsole combination. - Loads and spawns the audio via
UB1AudioManager(2D or attached depending onbFollow). - Sets the
MoveVelocityparameter on the audio component to match character speed.