Current frame in an animation

Current frame in an animation
0.0 0


I am working on a project with Cocos Creator that require me to sync several animations together.

Is it possible to go to a specific frame in an animation and play from that?
Know which frame is playing in an animation?


Hi! Here’s a piece of code I use to reverse an animation mid-air, hope it’ll point you in the right direction, check out cc.AnimationState stuff

		var anim = this.animation || this.node.getComponent(cc.Animation);
		var clip = this.clip && ||;
        var state = anim.getAnimationState(clip);
		var stateTime = state.duration - state.time;
		state.wrapMode = cc.WrapMode.Reverse;
		state.time = stateTime;


@persy this is a great way to find out current position of the animation

Is there a way to go to a specific frame in another animation and display that with out playing it .

What i need to do is sync 2 animations …


try something like this:

var state = anim.getAnimationState(clip);
state.time = desiredFrameTime;