I’m trying to get the current time/progress of an animation being played in an animation blueprint. How do I do this?
Hey @sweeetjd!
Do you think you could give us a screenshot of anything pertinent?
There are multiple ways to cause an animation to play, and so there are multiple ways to get the current time/progress! But I assure you it’s totally doable, I just want to give you information accurate to what you’re doing!
Its actually only possible via C++ with a dedicated animation blueprint class being assigned to the character.
Its the core of predictive animations - and the engine/epic hasn’t done anything yet to help expose those, or fix the million bad examples between tutorials and content that incorrecly use animation blueprints to do all sorts of things they should never be doing…
The custom function you create must be called from the character blueprint and evaluated outside of the animation bluerpint like anything else. The reason it has to exist within the Animation class is that it needs to access protected members to pull the information about the current animation being used.
Directly from an Anim_BP yes,
however if they are using Montages or decide to switch to montages they should be able to use “MontageGetPosition”.
I believe this is what I’m going to have to do. I ended up just using a curve in the ABP as a workaround.
Reading the curve value is usually safer/faster.