Get current Frame of animationgroup

the title pretty much says it all, i would like to get the current frame of a animationgroup wich is currently playing. Is there a way to get it?

The group can have various animations at different stages.
But if they are normalized (like all based on the same timeline) then this could give you what you need:

group.animatables[0].masterFrame
3 Likes

Hello everyone

I’m looking for a way to get the current frame or (masterFrame) expressed as a interger for an animation group on a GLTF that is imported into a scene.

For example in this playground:

Can the characters Samba animations current frame be exposed and expressed as a variable.

If I go into the inspector and have a look I can see sambaAnim current frame is getting updated. Just trying to find a way to access that value.

I’ve tried masterFrame, currentFrame and few other ideas but am always returning an undefined object.

Hey, here’s the same playground logging masterFrame of the first animatable every 500 ms. I’m guessing if it was undefined for you, you were prob trying to access the animatable before the animation was started… :slight_smile:

2 Likes

Thank you Blake, that solved it!

1 Like