Appearance
MotionMovementSoundComponent
MotionMovementSoundComponent plays movement sounds from Animation Notifiers with surface detection, speed-based modulation, and optional 3D audio.
Requirements
- The character must have a standard
UCharacterMovementComponent. - The Animation Blueprint must have footstep Animation Notifiers.
- The surface sound DataTable must use
FMotionSurfaceSoundDataRow. - The DataTable must have a row named by
DefaultSurfaceSoundRowName. The default row name isDefault.
For setup steps, see How to configure movement sounds.
Behavior
Animation Notifiers call trigger functions on the component. The notifier trigger functions only play sounds for locally controlled characters, because animation notifies can fire on every client.
When a footstep notify fires, the component traces for the active physical material. Then, it finds the applicable FMotionSurfaceSoundDataRow. If no material row matches, it uses DefaultSurfaceSoundRowName. The component selects the MetaSound variant from Motion state tags. Motion.State.Sprinting has priority. Motion.State.Crouching has second priority, and walking uses FootstepMetaSound.
For MetaSound-triggered movement sounds, the component calculates speed-based volume and pitch. It applies random variation from SoundSettings and the per-surface volume and pitch multipliers. When 3D audio is enabled, the runtime audio component plays the sound. If 3D audio is disabled, it plays the sound as 2D audio.
PlayModulatedSound is a direct Blueprint helper that plays a USoundBase with specified volume and pitch multipliers. It applies MasterVolumeMultiplier. Then, it uses the same 3D or 2D playback path. It does not do surface lookup, speed modulation, or random variation.
API
Sound triggers
TriggerFootstepSound(): plays a footstep sound, usually from foot contact notifies.TriggerJumpSound(): plays jump takeoff sound.TriggerLandingSound(): plays landing impact sound.TriggerMovementSound(SoundType): routes recognized string aliases to the footstep, jump, or landing trigger functions.Footstep,Walk,Crouch,Sprint, andRunroute toTriggerFootstepSound().Jumproutes toTriggerJumpSound().LandingandLandroute toTriggerLandingSound().PlayModulatedSound(Sound, VolumeMultiplier, PitchMultiplier): plays a supplied sound with the current master volume multiplier and the supplied pitch multiplier.
Surface and state
GetCurrentSurfaceType(): returns the currently detected surface type.GetSurfaceSoundData(PhysicalMaterial): C++ helper that returns the cached surface row for a physical material, or the configured default row when no material-specific row is found.OnSurfaceTypeChanged: Blueprint event fired when surface type changes.
Speed and volume helpers
GetSpeedBasedVolume(): returnsBaseVolume + SpeedVolumeMultiplier * SpeedRatio, clamped to0.0through2.0, then multiplied byMasterVolumeMultiplier.GetSpeedBasedPitch(): returnsBasePitch + SpeedPitchMultiplier * SpeedRatio, clamped to0.1through2.0.GetSpeedBasedModulation(BaseValue, SpeedMultiplier): C++ helper used by the volume and pitch helpers. It uses platform-relative movement speed divided byMaxWalkSpeed, clamped to0.0through1.0. When the movement component is unavailable, it returnsBaseValue.SetMasterVolumeMultiplier(Multiplier): clamps the master multiplier to0.0through2.0. It affects future speed-based volume calculations and directPlayModulatedSoundplayback.ReloadSurfaceSoundDataTable(): Reloads and validates cached surface sound rows from the appliedSurfaceSoundDataTableof the component. Use it for DataTable change tests at runtime or in editor-callable workflows.
Configuration
Configuration is in the assigned MotionMovementSoundProfile. The default Motion profile for this release is /MotionCore/Motion/Profiles/v2_0_0/DA_MotionMovementSoundProfile_Default_v2_0_0.
To change movement sounds, duplicate the Motion-owned movement sound profile into project content. Edit the duplicate. Then, assign it to the Profile property of the component. See Component profiles.
Surface data
SurfaceSoundDataTable: DataTable containing surface sound rows.DefaultSurfaceSoundRowName: fallback row name. Default:"Default".
Sound settings
SoundSettings:FMotionMovementSoundSettingscontainer.BaseVolume: base volume for movement sounds. Default:1.0.SpeedVolumeMultiplier: volume multiplier from movement speed. Default:0.5.BasePitch: base pitch for movement sounds. Default:1.0.SpeedPitchMultiplier: pitch multiplier from movement speed. Default:0.2.VolumeVariation: random volume variation range. Default:0.1.PitchVariation: random pitch variation range. Default:0.05.
Access sound settings through the SoundSettings fields of the assigned profile. To prevent speed-based volume or pitch changes, set the two speed multipliers to 0.0.
Feature toggles
bEnableSurfaceDetection: Enables per-trigger surface trace updates for sound variation. Initialization does one surface trace. The default istrue.bEnable3DAudio: Enables 3D spatial audio for sounds that this component plays. The default istrue.FootstepAttenuation: This is an optionalUSoundAttenuationasset for the shared runtime audio component. The component uses it whenbEnable3DAudiois true. When assigned, this asset overrides attenuation. When empty, 3D playback stays enabled and the default Unreal attenuation behavior applies.
State tags
Movement sounds use the native Motion active state tags. Motion.State.Sprinting selects SprintMetaSound. Motion.State.Crouching selects CrouchMetaSound when sprinting is not active.
The primary setting that you edit is the Profile reference. Trigger timing, cached surface state, audio component state, and diagnostics stay on the component.
Blueprint Events
OnFootstepTriggered(USoundBase* Sound, UPhysicalMaterial* SurfaceType, const FString& MovementState): fires when footstep sound is triggered.OnMovementSoundTriggered(const FString& SoundType, USoundBase* Sound): fires from the jump and landing trigger paths. Footsteps useOnFootstepTriggeredinstead.OnSurfaceTypeChanged(UPhysicalMaterial* NewSurfaceType, UPhysicalMaterial* OldSurfaceType): fires when surface type changes.
DataTable Row Reference
Movement sound DataTables use FMotionSurfaceSoundDataRow.
Row fields:
Physical Material: physical material matched for this surface.Sound Variants:FMotionSoundVariantswith MetaSound sources for movement actions.Volume Multiplier: per-surface volume multiplier.Pitch Multiplier: per-surface pitch multiplier.
Sound variant fields:
FootstepMetaSound: footstep sounds.JumpMetaSound: jump takeoff sounds.LandingMetaSound: landing impact sounds.CrouchMetaSound: optional crouch movement sounds.SprintMetaSound: optional sprint movement sounds.
The DataTable supplies the MetaSound sources for each surface and movement action. The component selects a source and applies its speed and random modulation. It also applies the volume and pitch multipliers of the row and selects 3D or 2D playback. A MetaSound source can implement left/right, synthesis, or sample variation. It does not replace the component surface lookup or sprint/crouch state selection.
Animation Notifier API
Animation notifiers can call these functions:
cpp
// Foot contact
TriggerFootstepSound();
// Jump start
TriggerJumpSound();
// Ground impact
TriggerLandingSound();
// String alias for a trigger path
TriggerMovementSound("Landing");