RealDocs

UGameplayStatics::SetGlobalPitchModulation

function Engine Blueprint Since 4.0
#include "Kismet/GameplayStatics.h"
Access: public Specifiers: staticUFUNCTIONBlueprintCallableBlueprintCosmetic

Description

Globally scales the pitch of all non-UI sounds, interpolating from the current value over TimeSec seconds. Useful for slow-motion audio effects that complement time dilation.

Caveats & Gotchas

  • BlueprintCosmetic — this is client-side only and has no effect on a dedicated server.
  • Applies to all non-UI sounds simultaneously; there is no per-sound-class pitch modulation through this API. For per-class control use Sound Classes.
  • Setting TimeSec to 0 causes an immediate pitch snap, which can sound jarring. Use a short interpolation time even for 'instant' transitions.

Signature

static ENGINE_API void SetGlobalPitchModulation(const UObject* WorldContextObject, float PitchModulation, float TimeSec);

Parameters

Name Type Description Default
WorldContextObject const UObject* Object used to retrieve the world context.
PitchModulation float Target global pitch scale. 1.0 = normal, < 1.0 = lower pitch, > 1.0 = higher pitch.
TimeSec float Duration in seconds to linearly interpolate from the current value to the target.

Return Type

void

Example

Pitch down sounds during slow-motion C++
// Pair with SetGlobalTimeDilation for slow-motion effect
UGameplayStatics::SetGlobalTimeDilation(this, 0.3f);
UGameplayStatics::SetGlobalPitchModulation(this, 0.5f, 0.1f);

// Restore
UGameplayStatics::SetGlobalTimeDilation(this, 1.0f);
UGameplayStatics::SetGlobalPitchModulation(this, 1.0f, 0.2f);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.