RealDocs

ACharacter::IsPlayingRootMotion

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

Description

Returns true if an AnimMontage with root motion mode RootMotionFromMontagesOnly is currently active. Use this to check whether the networked anim root motion code path is enabled.

Caveats & Gotchas

  • This checks only anim-montage root motion, not FRootMotionSource instances. If you need to detect all active root motion types (including those added via ApplyRootMotionSource), call HasAnyRootMotion() instead.
  • Returns false during the brief window after a montage ends but before the character fully transitions back to non-root-motion movement, which can cause one-frame logic errors in tick-based checks.

Signature

UFUNCTION(BlueprintCallable, Category=Animation, meta=(DisplayName="Is Playing Anim Root Motion"))
ENGINE_API bool IsPlayingRootMotion() const;

Return Type

bool

Example

Gate ability activation while a root-motion montage is running C++
void AMyCharacter::TryActivateAbility()
{
	if (IsPlayingRootMotion())
	{
		// Don't interrupt a root-motion montage with another ability
		return;
	}
	AbilitySystemComponent->TryActivateAbilityByClass(DashAbilityClass);
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.