UAnimInstance::GetSyncGroupPosition
#include "Animation/AnimInstance.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Returns the current marker-relative playback position of the given sync group as an FMarkerSyncAnimPosition, which stores the previous marker name, the next marker name, and the normalized position between them.
Caveats & Gotchas
- • Returns a default-constructed FMarkerSyncAnimPosition (empty marker names, 0 position) if the sync group does not exist or has no active leader. Always validate the returned marker names before using the position value.
- • The position value is normalised to [0, 1] between the previous and next marker. It does not represent actual time in seconds; convert using the leader animation's length and marker timings if wall-clock time is needed.
Signature
UFUNCTION(BlueprintCallable, Category="Animation", meta=(BlueprintThreadSafe))
ENGINE_API FMarkerSyncAnimPosition GetSyncGroupPosition(FName InSyncGroupName) const; Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| InSyncGroupName | FName | Name of the sync group to query. | — |
Return Type
FMarkerSyncAnimPosition Example
Read sync group position for procedural blending C++
FMarkerSyncAnimPosition Pos = GetSyncGroupPosition(FName("DefaultGroup"));
if (!Pos.PreviousMarkerName.IsNone())
{
// Use Pos.PositionBetweenMarkers (0..1) to drive a blend alpha
FootBlendAlpha = Pos.PositionBetweenMarkers;
} See Also
Tags
Version History
Introduced in: 4.12
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?