RealDocs

UCharacterMovementComponent::GetAnalogInputModifier

function Engine Blueprint Since 4.0
#include "GameFramework/CharacterMovementComponent.h"
Access: public Specifiers: UFUNCTIONBlueprintCallable

Description

Returns a modifier in [0..1] based on the magnitude of the last input vector, used to scale acceleration and max speed during movement.

Caveats & Gotchas

  • Returns 1.0 for full-magnitude or purely digital input (keyboard) — scaling only applies to genuinely analog input pushed below full magnitude.
  • Just returns the cached AnalogInputModifier value; the real computation happens once per update in ComputeAnalogInputModifier(), so calling this mid-tick after changing input won't reflect the change until the next update.

Signature

float GetAnalogInputModifier() const

Return Type

float

Example

Scale a movement-based camera shake C++
const float Modifier = GetCharacterMovement()->GetAnalogInputModifier();
PlayCameraShake(WalkShakeClass, Modifier);

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.