Best way to get the actual animation time?

I have a BP with some static meshes and some looped animated skeletal meshes and need to stop this animations at the begining of the loop when the player touch one trigger. If I could get the animation time in the moment of the overlapping with the trigger, I can force the play form this time in a non looped animation.

I have found the node GetPosition (Target is skeletal mesh) which I think get the position of the actual animation, but it return only 0

Is this node doing what I think it does or is there another better approach to accomplish what I need?

Thanks a lot.

I know this has gone a lone time without being answered - but I’m experiencing the same issue. I’m trying to access the current time of an animation that’s running in a character’s anim blueprint, and as in above, the return turns out to be zero. I’ve tried all sorts of different nodes, but nothing seems to be returning any sort of time values.

Has there been a solution to this?

At least I use the notifications in the animation but there is something that I’m doing worng because this soluton don’t work as I spect so I think I’m missing something

its not quite what youre asking for, but i think this will accomplish what youre trying to do.

in the state machine for the animation blueprint, use this for the condition when to switch animation states (just type Time remaining ratio and it will return the value for the most recent animation)

It is not even remotely what he asked for !!!

There is no way to use this outside of AnimBp state machine , so he cant resume his animation where he left off !

Maybe the key is to make it look like the animations are moving backwards, but do it outside of an Anim BP completely.
Instead of: Press X button, casting to character you want to reverse anims, getting the animation time and putting it backwards
it could be something like: Press X button, the character you want to animate backwards is hidden in game, a skeletal mesh is placed within the level. From there, maybe we can animate it within Sequencer and have some more control over the animation reversing? I’d imagine there’d be some trouble getting the new skel mesh to start at the right time, so maybe use some smoke + mirrors to cover up the glitchy part (switch cameras or something?)
IDK. I haven’t messed with this in weeks. If I try this out I’ll post my progress.
Good luck! :slight_smile:

I didn’t want to do a reversed animation, want to get the actual animation time of a looped animation running and replace this looped animation by a non looped animation and this new animation must to start from the actual animation frame/time

Could be easier to do this work working with frames than working with time?

sounds like the ‘Animation Mode’ of your skeletal mesh is set to ‘Use Animation Blueprint’. This way there is the ‘get position’ function will return 0.0 because the function can only get that dircetly from a certain animation that is being played. Your skeletal mesh would need to be set to ‘Use Animation Asset’ to work as intended.

There also are ‘animation notifications’ Animation Notifications (Notifies) | Unreal Engine Documentation
you should look for the ‘Custom Notifies’. They can only be received in the animation blueprint.You can add them in the animation asset itself. To add them, right-click on the Notifies ‘Add Notifify… >> New Notify’. To delete them from the timeline right-click ‘delete’. To delete them completely, right-click ‘Manage Notifies…’

I didn’t find any way to get a play position from an Animation BP, even though there is a node ‘get synch group position’ with an undecryptable data stucture ‘Marker Sync Anim Position Structure’.

btw. mark an answer, if there is one that solves the problem… There is a check under the rating of the answers :wink: