How can i get the current animation time ?

I’v tried using this function: GetAnimAssetPlayerTimeFromEnd
Link:https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Animation/UAnimInstance/GetAnimAssetPlayerTimeFromEnd/index.html
But it requires the current animation time, and how am i supposed to know that ?

If you know the time you started the animation you could subtract it from the current time, that would than be the current time.

Can you give a code example of how to do it please?

AnimInstance.h Has The Solutions

Dear ,

In the AnimInstance class (C++ version of Anim BP) you can get the current montage position (time) !



/** Get Current Montage Position */
float Montage_GetPosition(UAnimMontage* Montage);


Check out AnimInstance.h for lots more helpful functions like this!


**Using AnimInstance (Anim BP) In Code**

Recall that you can use these functions, from your Character class, like this



```


GetMesh()->GetAnimInstance()->TheFunction();


```



:)

Thanks ! :slight_smile:
I think it would of be a lot more clear if it said time instead of position though…