Limen Framework 0.1 Help

ULimenStepsSoundComponent

Overview

ULimenStepsSoundComponent is an audio component that plays step sounds based on the character's velocity and the surface it's moving on. It integrates with AI perception to register audio events, enhancing the realism of locomotion in games.

Properties

Type

Name

Access

Description

TArray<TSoftObjectPtr<[ULimenCharacterMovementAudioData](LimenCharacterMovementAudioData.md)>>

SoundSettingsList

EditDefaultsOnly

A list of sound settings for different physical materials.

uint8

bPlayIn3dSpace : 1

EditDefaultsOnly

Determines whether to play audio in the 3D world's space or ignore spatial audio.

ECollisionChannel

LineTraceCollisionChannel

EditDefaultsOnly

The collision channel used for line tracing to determine the physical material under the character.

double

LineTraceTolerance

EditDefaultsOnly

Tolerance value for line trace calculations.

TMap<double, FVector2D>

StepsSoundDelayBySpeed

EditDefaultsOnly

A map of velocity thresholds and corresponding sound delays and volume levels.

double

MinimumSilentSpeed

EditDefaultsOnly

The minimum speed at which audio events are registered with the AI system.

Functions

Return Type

Signature

Description

void

BeginPlay()

Initializes the component, sets up collision parameters, and retrieves necessary components.

void

TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)

Updates the audio settings based on the character's velocity and physical material.

void

PlayStepAudio()

Plays the step sound and registers an AI event if the character is moving at a sufficient speed.

UPhysicalMaterial*

GetStepPhysicalMaterial() const

Determines the physical material under the character using line tracing.

FVector2D

GetStepAudioDelayAndVolumeLevelForVelocity(const double Velocity) const

Interpolates between predefined sound delays and volume levels based on the character's velocity.

USoundBase*

GetStepSoundToPlay(const UPhysicalMaterial* PhysicalMaterial)

Selects the appropriate step sound based on the physical material under the character.

Usage & Implementation Notes

  • Threading Constraints: This component should be ticked on the game thread.

  • Replication Requirements: None.

  • Memory Lifetime Management: The component manages its own memory for audio data and settings.

  • Initialization Dependencies: Depends on UPawnMovementComponent and UAIPerceptionSystem.

22 May 2026