RealDocs

ACharacter::GetAnimRootMotionTranslationScale

function Engine Blueprint Since 4.8
#include "GameFramework/Character.h"
Access: public Specifiers: BlueprintCallableconst

Description

Returns the current scale factor applied to animation root motion translation. A value of 1.0 means full motion; 0.0 means translation is suppressed.

Caveats & Gotchas

  • The returned value reflects the replicated `AnimRootMotionTranslationScale` property. On simulated proxies, this value may lag by one replication frame relative to the server.
  • This getter is `BlueprintCallable` but `SetAnimRootMotionTranslationScale` is not exposed to Blueprint. To change the value from Blueprint you need a C++ thunk or a custom `BlueprintCallable` wrapper.

Signature

ENGINE_API float GetAnimRootMotionTranslationScale() const

Return Type

float

Example

Check scale before applying additional root motion modifier C++
void AMyCharacter::ApplySpeedBoost()
{
	// Only boost if root motion is already at full scale
	if (FMath::IsNearlyEqual(GetAnimRootMotionTranslationScale(), 1.f))
	{
		SetAnimRootMotionTranslationScale(1.5f);
	}
}

Version History

Introduced in: 4.8

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.