Skip to content

MotionMovementSoundComponent

Provides movement sound playback driven by Animation Notifiers with surface detection and speed-based modulation.

Requirements

  • Character with standard UCharacterMovementComponent
  • Animation Blueprint with footstep Animation Notifiers
  • Surface sound DataTable configured
  • DataTable Requirements:
    • Must use FMotionSurfaceSoundDataRow row structure
    • Include at least a "Default" row for fallback sounds
  • Gameplay Tags (optional):
    • Can react to movement state tags for sound variations

Installation

  1. Add UMotionMovementSoundComponent to your Character Blueprint or C++ class
  2. Create a DataTable using FMotionSurfaceSoundDataRow row structure
  3. Add surface types (Concrete, Wood, Grass, etc.) with corresponding sounds
  4. Set the SurfaceSoundDataTable property to your DataTable
  5. Configure DefaultSurfaceSoundRowName (typically "Default")
  6. Add Animation Notifiers to call TriggerFootstepSound() at appropriate frames

Functionality

The component detects surface types and plays appropriate sounds when triggered by Animation Notifiers.

Expandability

FunctionDescriptionUse Case Examples
TriggerFootstepSound()Main function to trigger sounds• Call from Animation Notifiers
• Trigger from code events
TriggerJumpSound()Play jump takeoff sound• Different sounds for jump types
• Surface-specific jump sounds
TriggerLandingSound()Play landing impact sound• Fall damage indicators
• Heavy landing effects
GetCurrentSurfaceType()Override surface detection• Water detection
• Special material handling
OnSurfaceChangedBlueprint event for surface changes• Update UI surface indicator
• Trigger particle effects

Configuration

Surface Data Properties

PropertyTypeDefaultDescription
SurfaceSoundDataTableUDataTable*-DataTable containing surface sound configurations
DefaultSurfaceSoundRowNameFName"Default"Default row name for fallback sounds

Sound Settings

PropertyTypeDefaultDescription
BaseVolumefloat1.0Base volume for movement sounds
SpeedVolumeMultiplierfloat0.5Volume multiplier based on movement speed
BasePitchfloat1.0Base pitch for movement sounds
SpeedPitchMultiplierfloat0.2Pitch multiplier based on movement speed
VolumeVariationfloat0.1Random volume variation range (±)
PitchVariationfloat0.05Random pitch variation range (±)

Feature Configuration

PropertyTypeDefaultDescription
bEnableSurfaceDetectionbooltrueDetect surface types for sound variation
bEnableSpeedModulationbooltrueModulate audio based on movement speed
bEnable3DAudiobooltrueEnable 3D spatial audio for footsteps
MaxAudioDistancefloat2000.0Maximum distance for footstep audio

Debug Configuration

PropertyTypeDefaultDescription
bShowDebugInformationboolfalseDebug information display

Blueprint Events

Event Functions

EventParametersDescription
OnFootstepTriggeredUSoundBase* Sound, UPhysicalMaterial* SurfaceType, const FString& MovementStateFired when footstep sound is triggered (includes movement state)
OnMovementSoundTriggeredconst FString& SoundType, USoundBase* SoundFired when any movement sound is triggered
OnSurfaceTypeChangedUPhysicalMaterial* NewSurfaceType, UPhysicalMaterial* OldSurfaceTypeFired when surface type changes

DataTable Setup

Create a DataTable with FMotionSurfaceSoundDataRow row structure:

Row Structure Properties

PropertyTypeDescription
Physical MaterialUPhysicalMaterial*Physical material to match for this surface
Sound VariantsFMotionSoundVariantsMetaSound sources for all movement actions
Volume Multiplierfloat (0.0-2.0)Volume multiplier for sounds on this surface
Pitch Multiplierfloat (0.1-2.0)Pitch multiplier for sounds on this surface

Sound Variants Structure

MetaSound PropertyDescription
FootstepMetaSoundFootstep sounds (handles variation internally)
JumpMetaSoundJump takeoff sounds (handles variation internally)
LandingMetaSoundLanding impact sounds (handles variation internally)
CrouchMetaSoundCrouch movement sounds (handles variation internally)
SprintMetaSoundSprint movement sounds (handles variation internally)

Note: All sounds are MetaSound sources that handle variation and movement state internally. The CrouchMetaSound and SprintMetaSound fields are optional and only needed if you want specific sounds for those movement states.

Animation Notifier Integration

In your Animation Blueprint:

  1. Add Animation Notifier at appropriate movement frames
  2. Call the corresponding trigger function for the movement type
  3. Component handles surface detection, speed modulation, and sound selection

Notifier Function Calls

cpp
// Footstep Animation Notifier
Target: MotionMovementSoundComponent
Function: TriggerFootstepSound
// No parameters needed - automatic detection

// Jump Animation Notifier  
Target: MotionMovementSoundComponent
Function: TriggerJumpSound
// Triggered at jump start

// Landing Animation Notifier
Target: MotionMovementSoundComponent  
Function: TriggerLandingSound
// Triggered at ground impact

// Custom Movement Sound
Target: MotionMovementSoundComponent
Function: TriggerMovementSound
SoundType: "Slide" // or "Vault", "Climb", etc.

Motion - Advanced First Person Character Controller